Quantcast
Channel: rtrouton – Der Flounder
Viewing all articles
Browse latest Browse all 764

Uninstalling App Store apps from the command line

$
0
0

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.



Viewing all articles
Browse latest Browse all 764

Trending Articles