Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Teenso

macrumors newbie
Original poster
Sep 11, 2020
12
0
Good day community. I would like to see why I'm having issues with trying to uninstall an app through terminal. I was reading on the web that its possible to uninstall through terminal. The command line that I saw was

$sudo uninstall file:// ( then you would drag the app from the application folder and paste it on the terminal ).

After putting my ADMIN password it says " sudo: uninstall: command not found".

What could this be?
 

chrfr

macrumors G5
Jul 11, 2009
13,729
7,303
Good day community. I would like to see why I'm having issues with trying to uninstall an app through terminal. I was reading on the web that its possible to uninstall through terminal. The command line that I saw was

$sudo uninstall file:// ( then you would drag the app from the application folder and paste it on the terminal ).

After putting my ADMIN password it says " sudo: uninstall: command not found".

What could this be?
That's not a thing. Some apps might have some sort of command line tool but there's nothing like that in macOS by default.
 

Taz Mangus

macrumors 604
Mar 10, 2011
7,815
3,504
Good day community. I would like to see why I'm having issues with trying to uninstall an app through terminal. I was reading on the web that its possible to uninstall through terminal. The command line that I saw was

$sudo uninstall file:// ( then you would drag the app from the application folder and paste it on the terminal ).

After putting my ADMIN password it says " sudo: uninstall: command not found".

What could this be?

Apps in macOS are generally self contained and reside in /Applications folder. There are exceptions to this and those kind of apps have a uninstaller script that you can run. There are preference files, for the app, that can reside in the ~/Library/Application Support and ~/Library/Preferences folders.

I use the free called AppCleaner when I want to remove an app. It does a pretty good job of finding the preference files associated with an app. If the app has an uninstaller script, I use that instead of AppCleaner.

 
Last edited:

Taz Mangus

macrumors 604
Mar 10, 2011
7,815
3,504
There are many, many apps which aren't covered by that.

Yes and that is why I said "generally" and "There are exceptions to this and those kind of apps have a uninstaller script that you can run."
 

Teenso

macrumors newbie
Original poster
Sep 11, 2020
12
0
Apps in macOS are generally self contained and reside in /Applications folder. There are exceptions to this and those kind of apps have a uninstaller script that you can run. There are preference files that can reside in the ~/Library/Application Support and ~/Library/Preferences folders.

I use the free called AppCleaner when I want to remove an app. It does a pretty good job of finding the preference files associated with an app.

Thank you for the tip. I Would like to just make sure based on what you told me some apps have the uninstall script so when I run the "sudo uninstall file:// " command ".It will interact with it correct?
 

chrfr

macrumors G5
Jul 11, 2009
13,729
7,303
Please check this website.[ https://whatsabyte.com/mac/how-to-uninstall-programs-on-mac/ ] scroll down to the section How To Uninstall Apps On Mac OS X Using The Command Line
Those are incorrect instructions. As you've seen, it doesn't work.
[automerge]1599878202[/automerge]
Thank you for the tip. I Would like to just make sure based on what you told me some apps have the uninstall script so when I run the "sudo uninstall file:// " command ".It will interact with it correct?
Apps that have an uninstall script would not work this way, and there's no universal way to uninstall apps on a Mac.
 

Taz Mangus

macrumors 604
Mar 10, 2011
7,815
3,504
Thank you for the tip. I Would like to just make sure based on what you told me some apps have the uninstall script so when I run the "sudo uninstall file:// " command ".It will interact with it correct?

As @chrfr has pointed twice now there is no uninstall command in macOS. The uninstall script would be unique to each app that has one. Some apps you would drag them from /Applications folder to the trash to uninstall them. While others you would execute a specific uninstall script to uninstall them. For instance, I have installed a Epson printer driver which includes some Epson utility software. In order for me to uninstall the Epson printer driver I would double-click with the mouse on /Applications/Epson Software/Uninstaller from Finder. Another case, I have an app called BBEdit installed. If I want to uninstall it I bring up the AppCleaner app and drag /Applications/BBEdit to the AppCleaner window which will find the preference files for BBEdit to be removed.

With macOS, in most cases, there really is no need to use the Terminal to remove apps, it can be done from Finder. I suppose there are some unique cases where you would need the Terminal to execute a uninstaller script.
 

jbarley

macrumors 601
Jul 1, 2006
4,023
1,895
Vancouver Island
Good day community. I would like to see why I'm having issues with trying to uninstall an app through terminal. I was reading on the web that its possible to uninstall through terminal. The command line that I saw was

$sudo uninstall file:// ( then you would drag the app from the application folder and paste it on the terminal ).

After putting my ADMIN password it says " sudo: uninstall: command not found".

What could this be?
sudo rm -rf (now drag file to here)
This works for me every time.
 
  • Like
Reactions: Teenso

Teenso

macrumors newbie
Original poster
Sep 11, 2020
12
0
sudo rm -rf (now drag file to here)
This works for me every time.
Thank you Will give it a try thanks
[automerge]1599884709[/automerge]
As @chrfr has pointed twice now there is no uninstall command in macOS. The uninstall script would be unique to each app that has one. Some apps you would drag them from /Applications folder to the trash to uninstall them. While others you would execute a specific uninstall script to uninstall them. For instance, I have installed a Epson printer driver which includes some Epson utility software. In order for me to uninstall the Epson printer driver I would double-click with the mouse on /Applications/Epson Software/Uninstaller from Finder. Another case, I have an app called BBEdit installed. If I want to uninstall it I bring up the AppCleaner app and drag /Applications/BBEdit to the AppCleaner window which will find the preference files for BBEdit to be removed.

With macOS, in most cases, there really is no need to use the Terminal to remove apps, it can be done from Finder. I suppose there are some unique cases where you would need the Terminal to execute a uninstaller script.
Sorry I'm kinda of a slow learner.
 

Taz Mangus

macrumors 604
Mar 10, 2011
7,815
3,504
sudo rm -rf (now drag file to here)
This works for me every time.

Not something I would suggest a beginner to use. rm -rf can do a lot of damage if you get it wrong and it is easy to get it wrong. Drag and drop to the trash is a lot safer, easier to do and accomplishes the same thing. From time to time I have seen posts from people who used rm -rf and wiped out part of their user account.
 
Last edited:

chrfr

macrumors G5
Jul 11, 2009
13,729
7,303
sudo rm -rf (now drag file to here)
This works for me every time.
That might delete a single application, but it’s risky, and it won’t delete any ancillary files the app may have installed.
 

Tech198

Cancelled
Mar 21, 2011
15,915
2,151
I think there could be some exceptions... For eg... If you wish to uninstall VMWare Fusion from Terminal, you would go inside the package to the "Contents >> Resources"" folder >>> uninstall.tool and run the script.

Although it doesn't always work,even with the script being in "LaunchAgents" in Macintosh HD.. i found..

Its on and off. Sometimes it works, other times it doesn't.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.