2

Most apps come packaged in a .dmg file, where once mounted all you have to do is copy the .app, special directory to you Applications folder and that's it. Nice and clean, if you ever want to uninstall the app, you just remove it.

However, what about .pkg files? I know there are some commercial solutions, but really, that's not to satisfactory.

  • 2
    If you encounter .pkg files without a corresponding uninstaller, please contact the developer and ask them. – Graham Miln Mar 6 '20 at 5:46
2

Each .pkg file generally differ in where they install the files, so unlike a .app bundle, there is no generalized way to uninstall the contents of a .pkg file.

A .pkg file is an installer package. It is run with the help of the macOS built-in Installer app, and allows the installation of the files contained under the package under various directories as programmed by the developer of the software.

Here's are a bunch of approaches that can be tried:

  1. Check the .pkg file and any associated files provided by the developer. Sometime, such software package also come with either a dedicated or a built-in uninstaller. Running the uninstaller generally takes care of uninstalling the files/apps installed by the package.

    If you don't find any obvious uninstaller, consider contacting the developers of the app and ask them.

  2. Use a 3rd party utility such as AppCleaner to uninstall the .pkg installed app. It gives you a simple interface to look through and select from all the installed apps, locates all the files associated with an app, and let you uninstall the app(s) completely.

    From the app website:

    AppCleaner is a small application which allows you to thoroughly uninstall unwanted apps.

    Installing an application distributes many files throughout your System using space of your Hard Drive unnecessarily.

    AppCleaner finds all these small files and safely deletes them.

    Simply drop an application onto the AppCleaner window. It will find for the related files and you can delete them by clicking the delete button.

  3. Prefer using Homebrew Cask to install the desired GUI app(s), if the developers is distributing them via Homebrew. To use Homebrew Cask, start by installing Homebrew and then run brew cask to install Homebrew Cask.

    To see if an app is available via Homebrew Cask, simply run the following command to search the Homebrew database:

    brew search <app_name> --casks
    

    where <app_name> is full or partial name of the desired (GUI) app.

    Homebrew Cask lets you easily install an app by running:

    brew cask install <app_name>
    

    To uninstall an app installed via Homebrew Cask, run:

    brew cask uninstall <app_name>
    

    To unconditionally remove all files associated with the given app which is installed via Homebrew Cask, run:

    brew cask zap <app_name>
    

    Make sure to update the Homebrew's local repository of all the available packages by running the following command, before attempting to search for and install packages:

    brew update
    
  • 1
    I'm deeply suspicious of the merits of AppCleaner. Such apps have a track record of deleting the wrong thing, still not deleting the required things, and of sloppy practices. Much better would be to use Pacifist to inspect the package and see what it installed and where. – benwiggy Mar 6 '20 at 11:27
  • How does AppCleaner know which files to delete? – sunknudsen Apr 16 '20 at 12:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .