Uninstalling Packages (from pkg or mpkg files)

I understand how general application packages work with the .app extension. I realize that they (can) write extra stuff, typically in ~/Library/Preferences and to delete these apps (or technically, application packages) you simply drag them to the trash (or cmd-delete).

My question is about the other type of packages, the ones with .pkg and .mpkg extensions that require Installer.app to install (or that are installed during Software Update). When these packages are installed there is a receipt made in /Library/Receipts, and you can use Installer.app (or another app call lsbom I think) to inspect the files that were installed for this package, but how can you delete them altogether?

Is there an automated way in OS X to uninstall pkg / mpkg packages? I'm looking for something which in the (red hat) linux world can be done with:

rpm -e package-name

Which will consult the receipt and delete all the files associated with the package.

Posted on Oct 27, 2006 3:26 PM

Reply
9 replies

Oct 27, 2006 3:45 PM in response to Robert J. Carr

Are you looking for a Unix package manager or something for OS X to simply uninstall applications? Your request is rather unclear in this regard.

Uninstalling applications in OS X is pretty straight forward, and as Wade has indicated there are several third-party utilities to help with the process. However, it's easy enough without third-party software. Wade gave you a good link to check out. Here's some additional info:

Uninstalling Software: The Basics

Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash. Most applications create preference files which are stored in the /Home/Library/Preferences/ folder. Although they do nothing once you delete the associated application, they do take up some disk space. If you want you can located them in the above location and delete them, too.

Some applications may install an uninstaller program that can be used to remove the application. In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.

Some applications may install components in the /Home/Library/Applications Support/ folder. You can also check there to see if the application has created a folder. You can also delete the folder that's in the Applications Support folder. Again, they don't do anything but take up disk space once the application is trashed.

Some applications may install a startupitem or a Log In item. Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder. Log In Items are set in the Accounts preferences. Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab. Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.

If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term.

There are also several shareware utilities that can uninstall applications:
AppZapper 1.6
AppDelete
CleanApp
Yank 1.31
SuperPop 1.0b2
Uninstaller 1.99
Spring Cleaning 8.0

For more information visit The XLab FAQs and read the FAQ on removing software.

If your query is for a Unix package manager then I believe you want to check into Fink. There is a version available for OS X.

Oct 27, 2006 3:51 PM in response to Kappy

Kappy: I like how you say it is "pretty straight forward" and then give a "basics" article that has about 10 different ways things can be installed. Nice! Sounds basic to me!

Thanks for the info though ... Wade has already answered my question, which can be summarized as "Mac OS X Doesn't Have a Package Manager".

Just to be clear, my original question was, in summary, "how are non-application packages uninstalled?". Application packages are nice and tidy because they are self-contained (with the exception, as I pointed out, of preferences and application support details, etc), but pkg and mpkg packages (what I'm referring to as 'non-application packages' ... is there an official name?) can spread their files wherever they want.

Just wondering if there is an Apple approved way of uninstalling (or deleting) these packages other than manually consulting the package receipt.

Make sense now?

Oct 27, 2006 3:57 PM in response to Robert J. Carr

If the application cannot be cleanly uninstalled by dragging it to the trash, the developer should provide an uninstaller. If this is not the case, the next step is to send a scathing e-mail to the developer, calling them things like "unprofessional" and the like. Too many developers give too little attention to installers/uninstallers, when it should be a serious portion of development. (Can anybody tell that I write installs/uninstalls for a living?)

Oct 27, 2006 7:22 PM in response to Robert J. Carr

I think Wade has described it pretty well. The packages you are referring to are generally installers. A .mpkg is a "Master" package meaning that it installs more than one package, usually at the option of the user. OS X applications are themselves packages as you mentioned.

If a installer actually installs needed files in folders that would not normally be benign if left orphaned (like a preference file) then the developer should provide a specialized uninstaller. It's poor programming to install something, say, in the Extensions or StartupItems folders and not provide a means to remove them if the application itself is discarded.

If you follow Wade's and my suggestions you can easily uninstall any application that does not include an uninstaller. You needn't rely on the package receipt. Besides, not all third-party software even installs a receipt.

Oct 28, 2006 9:47 AM in response to Kappy

I think Wade has described it pretty well. The
packages you are referring to are generally
installers. A .mpkg is a "Master" package


Installers and master packages, okay ... got the vernacular now.

If a installer actually installs needed files in
folders that would not normally be benign if left
orphaned (like a preference file) then the developer
should provide a specialized uninstaller.


As far as I know, Apple doesn't provide any uninstallers for any of their "installers", and they spread files out all over the place.

If you follow Wade's and my suggestions you can
easily uninstall any application that does not
include an uninstaller. You needn't rely on the
package receipt


Huh? I must have missed what you said. Sure, you provided some guideance, but this doesn't guarantee a full deletion. Even the comments on some of the applications you suggested say that some remains are left over. Am I missing something?

Besides, not all third-party
software even installs a receipt.


What? Every pkg or mpkg does "install" a receipt ... the developer doesn't do this, the OS does, or rather, most likely Installer.app.

Oct 28, 2006 10:05 AM in response to Robert J. Carr

Package receipts are provided by the installer only if the developer includes one. I have dozens of applications installed on my system that had no receipts installed. If you read the Developer documentation on the use of receipts you will find that this is not automatically performed by either the OS or the installer.

Apple doesn't supply uninstallers (most of the time) because they don't intend for you to uninstall system software and upgrades. You cannot simply uninstall OS X. As for applications they are contained in packages and rarely ever install anything that isn't benign if the app is deleted. However, Apple has on occasion provided means for uninstalling versions of QuickTime by issuing separate uninstallers. There are only two ways to uninstall a version of OS X: Erase and Install or Archive and Install.

Hmm, I thought my message on how to uninstall applications was pretty thorough. I'm not sure how you would fail to miss any remaining components if you followed the suggestions I provided. They weren't "guidance", but procedures. If I've been unclear about anything please let me know.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Uninstalling Packages (from pkg or mpkg files)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.