Skip to main content

How to uninstall Mac OS X .pkg packages

How to uninstall Mac OS X .pkg packages
By SHARNINDER | Published: OCTOBER 29, 2009


Most applications on OS X are distributed using either a .DMG disk image file or a .pkg installer. Installing using a DMG is the easiest. Just drag the application from the mounted image to the Applications folder and you’re done.

The .pkg installer, on the other hand, works like a traditional installer. Double click the program, go through a couple of steps using a Wizard and the application is installed. Unlike other operating systems, though, Apple doesn’t provide a simple method to uninstall applications.

In the case of a DMG based install, all you have to do is drag the application from the Applications folder into the Trash and it’s gone. A pkg based installer, on the other hand, doesn’t offer any such luxuries. The user depends on the developer to provide an uninstaller for their application, which is often not the case.

So, how do you uninstall applications installed using a .pkg installer ?

Well, the truth is other than using third party applications to handle uninstallation there really is no way … unless … you know which files are installed by the installer in the first place.

Since, there is no registry to take care of on Mac OS X, you only need to delete all files belonging to a particular application to remove all traces of the app.

OS X keeps track of all installed packages using receipts stored in the /Library/Receipts folder. Launch the Terminal application and list the contents of the Receipts folder using the ‘ls -al’ command.

pkg-002.png


Suppose, I want to find out the list of files installed by the Mobile_Connect_Drv_App.pkg installer.

Use the cd command to browse into the above mentioned folder.

cd /Library/Receipts/Mobile_Connect_Drv_App.pkg/Contents

pkg-003.png


The file that we’re interested in is Archive.bom. BOM stands for bill of materials and this is the file which contains the list of all the files installed by the pkg installer.

To read the Archive.bom file, we need to use the lsbom utility.

lsbom -pf Archive.bom | less

pkg-004.png


The -pf options tells lsbom to only display the file names.

Now, you can just go ahead and delete all the files that lsbom lists. That should get rid of the package for good !

Comments

Popular posts from this blog

NetSurveyor :: 802.11 (WiFi) Network Discovery / Scanner Tool

NetSurveyor :: 802.11 (WiFi) Network Discovery / Scanner Tool http://www.performancewifi.net/performance-wifi/main/NetSurveyor.htm NetSurveyor is an 802.11 (WiFi) network discovery tool and, as such, its goal in life is to gather information about nearby wireless access points in real time and display it in a useful way. Similar in purpose to NetStumbler , it includes many more features. The data is displayed using a variety of different diagnostic views and charts. Data can be recorded for extended periods and played-back at a later date/time. Also, reports can be generated in Adobe PDF format. Applications for NetSurveyor include the following: During the installation of a wireless network, as an aid in verifying the network is properly configured and antennas are positioned at locations to achieve efficient transmission / reception -- that is, for use in verifying WiFi coverage and maximizing beacon signal strength Trouble-shooting an existing network or wireless environm...

Handle Too-Long Command Lines with xargs

Handle Too-Long Command Lines with xargs xargs is one of those UNIX utilities that seems pretty useless when you first hear about it -- but turns into one of the handiest tools you can have. xargs reads a group of arguments from its standard input, then runs a UNIX command with that group of arguments. It keeps reading arguments and running the command until it runs out of arguments. The shell's backquotes do the same kind of thing, but they give all the arguments to the command at once. This can give you a Too many arguments error. Here are a couple of examples: If you want to print most of the files in a large directory, put the output of ls into a file. Edit the file to leave just the filenames you want printed. Give the file to xargs ' standard input: % ls > allfiles.tmp % vi allfiles.tmp % xargs lpr What did that do? With lines like these in allfiles.tmp : % cat allfiles.tmp afile application ... yoyotest zapme xargs ran one or more lpr commands, each wit...

Cisco Command "Auto secure"

Cisco Command "Auto secure" In today's article, I'm going to quickly inform you about the Privileged EXEC command named "auto secure". Network administrators (like you) use the "auto secure" command to secure the management and forwarding planes of a router. Another way of saying it is, CCNAs use this command to secure a router by disabling common IP services which can be exploited by attackers to initiate network attacks. When the command is typed on a router, it takes the user (ccna) through a command line-interface (CLI) semi-interactive session (which is also known as the AutoSecure dialogue). Below is the command's syntax: auto secure [management | forwarding] [no-interact | full] [ntp | login | ssh | firewall | tcp-intercept] As you can see, the command can use several "optional" keywords: management - This (optional) keyword is used to only secure the management plane of a router. forwarding - This (optional) keyword is used to...