Skip to content
  • Home
  • About
  • Contact
« How To connect to a Cisco VPN using Mac OS X 10.6
Tips for making Windows Vista work for you »

How to uninstall Mac OS X .pkg packages

By Sharninder | Published: October 29, 2009

pkg installerMost 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 installer receipts

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 bom file listing

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 BOM listing

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 !

About Sharninder:

Programmer, blogger and a geek making a living shifting bits around the Internet. Sharninder is the owner of Geeky Ninja
Related Posts with Thumbnails
  • PrintFriendly
  • Yahoo Buzz
  • Google Reader
  • Delicious
  • Evernote
  • LinkedIn
  • StumbleUpon
  • Tumblr
  • Identi.ca
  • Digg
  • Facebook
  • FriendFeed
  • Reddit
  • Technorati Favorites
  • Twitter
  • Share/Bookmark

Random Posts

  • Lunascape – World’s First Triple Engine Browser
  • Glide OS – A web based free operating system
  • Clone an Ubuntu system using Synaptic Markings
  • Resize images easily with Bulk Image Resizer
  • How to revoke access to Twitter Applications
This entry was posted in Mac OS X. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
« How To connect to a Cisco VPN using Mac OS X 10.6
Tips for making Windows Vista work for you »

4 Comments

  1. Scruffy Bob
    Posted October 30, 2009 at 3:49 am | Permalink

    Hm, I went into /Library/Receipts and there was only an empty BSD.pkg file and a InstallHistory.plist file. I know I have installed several .pkg files recently, but there is no record of them there.

    Reply
  2. Scruffy Bob
    Posted October 30, 2009 at 3:53 am | Permalink

    I found the solution – in 10.6 (Snow Leopard), this directory is now /private/var/db/receipts.

    Reply
  3. Scruffy Bob
    Posted October 30, 2009 at 4:02 am | Permalink

    And I just found one more way to do this :)

    To get a list of installed packages:

    pkgutil --pkgs

    Then, you can get a list of files in the package with:

    pkgutil --files packagename

    Reply
    • Sharninder
      Posted October 30, 2009 at 8:29 am | Permalink

      That’s pretty cool Bob. I upgraded (from Tiger) last night and can see now that pkgutil is a much better way to view details about all the packages installed. I think the pkgutil –unlink command can also be used to perform an uninstall instead of manually deleting files.

      Reply

Post a Comment

Click here to cancel reply.

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

  • Subscription Options:

  • Recent Posts

    • How to add Facebook chat to iChat on Mac OS X
    • How To Get Music Off your iPhone
    • Monitor your websites for free using WasitUp?
    • Grooveshark: Listen to unlimited music online for Free
    • Glide OS – A web based free operating system
    • December Roundup – Best of the Web
    • HowTo install RockBox on your iPod
  • Recent Comments

    • How To Get Music Off your iPhone | Geeky Ninja on How To Get Music Off your iPod
    • Sharninder on Grooveshark: Listen to unlimited music online for Free
    • Briefgold on Grooveshark: Listen to unlimited music online for Free
    • Matjaz on Recover data from an iPhone backup
    • Simon on Recover data from an iPhone backup
  • Most Popular Posts

    1. 3%HowTo install RockBox on your iPod
    2. 2%Grooveshark: Listen to unlimited music online for Free
    3. 2%Glide OS - A web based free operating system
    4. 2%Want to see what the Google Wave Hype is all about ? We've got invites for you
    5. 2%Find the cheapest books on Amazon using CheapRiver
    6. 2%Monitor your websites for free using WasitUp?
    7. 1%December Roundup - Best of the Web
    8. 1%How To Get Music Off your iPhone
    9. 1%How to add Facebook chat to iChat on Mac OS X
  • Categories

    • Announcements
    • Firefox
    • Internet
    • iphone
    • Linux
    • Mac OS X
    • Open Source
    • Tips and tricks
    • Useful Utilities
    • WebApps
    • Windows
  • Archives

    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
Powered by WordPress.