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.
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
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
Now, you can just go ahead and delete all the files that lsbom lists. That should get rid of the package for good !
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.
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
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
Now, you can just go ahead and delete all the files that lsbom lists. That should get rid of the package for good !
Comments
Post a Comment