Home > Mac administration, Mac OS X > Uninstalling App Store apps from the command line

Uninstalling App Store apps from the command line

Over the weekend, Rasmus Sten posted to Twitter about an interesting uninstall command line utility that he had found while testing 10.10.

Screen Shot 2014-08-17 at 9.39.07 AM

On investigation, it became apparent that this uninstall utility was not new and was available starting in 10.7.x and later. It also appears to be undocumented and has neither a man page or help pages available.

To use the uninstall tool:

1. Log into the Mac in question

2. Verify that your application was installed by the App Store

3. Open Terminal

4. Run the following command with root privileges:

uninstall file:///Applications/Application_Name_Here.app

5. You will be prompted to authenticate with an administrator’s username and password

Screen Shot 2014-08-17 at 8.44.55 AM

6. The application should then be uninstalled.

Screen Shot 2014-08-17 at 8.47.17 AM

After working with this tool, it does have some limitations. For more details, see below the jump.

It appears that the uninstall tool can only be used to uninstall applications that were installed by the App Store and only when logged in. When I tried to uninstall an App Store-installed application while the Mac was logged out, I received this message.

Screen Shot 2014-08-17 at 9.09.24 AM

My working assumption is that the authentication dialog window is a necessary part of the process. Even when run with root privileges, the separate authentication is needed or the uninstall daemon cannot be contacted.

I also tried to uninstall an application that had not been installed via the App Store. In that case, the application was not uninstalled. Instead, I received the following message:

Screen Shot 2014-08-17 at 8.45.30 AM

I was able to uninstall an App Store-installed application while logged in as a different user account than the account who installed the applications from the App Store. In my testing of this, I had also not signed into the App Store while logged into the different user account.

Even though I was logged in as a different user and hadn’t signed into the App Store, I was still able to uninstall App Store-install applications.

Screen Shot 2014-08-17 at 8.47.41 AM

Screen Shot 2014-08-17 at 8.48.28 AM

Based on this testing, it appears that the uninstall tool has the following requirements:

  1. The uninstall tool must be run from a account that is logged in at the console.
  2. The uninstall tool must be able to display the authentication dialog window.
  3. The application being uninstalled must have originally been installed by the App Store.
  4. The account running the uninstall tool must have both administrative rights and sudo privileges, in order to run the command with root privileges and properly authenticate at the authentication dialog window.

Since the uninstall tool itself appears to be undocumented, that’s all the information I currently know about it.

Have any more information? Please let me know in the comments.

  1. yuta.ooka@gmail.com
    November 16, 2014 at 1:37 pm

    Terminal says: “uninstall: command not found”

  2. Brad Vrooman
    December 19, 2014 at 9:17 pm

    Strangely, I have the same issue as the previous commenter. On a 10.10.1 box, ‘which uninstall’ returns no results.

  3. Ed
    June 1, 2016 at 8:11 pm

    Same issue as the 2 commenters above. Command not found (OS X 10.11.5)

    • Ed
      June 1, 2016 at 8:23 pm

      And I just found this was removed in 10.10.1…

  1. No trackbacks yet.

Leave a comment