To Uninstall MacOS Packages

For some bizarre reason, the package management tools for MacOS do not have an option to uninstall in any easy way. However, if you drop into the Terminal, you can do all the steps by hand relatively easily.

There is a command called pkgutil that will give you the information you need.

To list all the installed packages, use the command:

pkgutil --packages 

The output will be a list of files in the com.apple.pkg.Application format. Find the appropriate package from that list. Then, you can get a list of all the files that were installed:

pkgutil --files com.apple.pkg.Application --only-files

Of course, substituting the full package name of the one you want to remove the files from.

This will provide a full dump of the files. Remove all the files that are listed here.

The command listed will only list actual files, and not the folders. Removing the files should be safe.

To list the folders that were created, you can use the command:

pkgutil --files com.apple.pkg.Application --only-dirs 

You will have to use your judgement on which folders you uninstall, though. You don’t want to remove any that are in use by other packages. If you’re not 100% sure about a folder, leave it. An empty folder generally won’t harm anything.

Once you have removed all the files (and folders), you want to tell the package management tool that it doesn’t need to remember it anymore:

pkgutil --forget com.apple.pkg.Application

Note: If you see any files created in folders named LaunchAgents or LaunchDaemons you will want to log out and log back in once you have removed them to make sure everything is cleanly unloaded.

Leave a Comment