How to Completely Remove Apps & Software in Mac OS X by Manual Terminal Uninstall
Most apps in Mac OS X can be uninstalled easily by dragging them into the Trash from the /Applications/ folder, and many others come with accompanying uninstall applications that will clean house and completely remove the apps too. Additionally, there are third party utilities for Mac OS that can make total removal of apps as simple as drag and drop.
Another solution, which is best reserved for and intended for use by advanced Mac users only who are comfortable with the command line and have a deeper knowledge of Mac OS X, is the thorough manual removal of an app and all associated components, and that’s what we’ll cover here.
This process method is much more technical, and relies on the terminal to accomplish the complete uninstall procedure. Again, this is intended for advanced users only, and it is rarely necessary to remove an app or application components this way. We’ll break the steps into a few parts, first will be finding the app and related components, which requires some level of knowledge and discretion to determine what is related and what is not, and second, the actual removal of the appropriate files. If you’re an expert user who is very comfortable with this prospect and you just want some actionable command without any explanation as to what’s going on and why, you can jump to a condensed version below.
How to Find All Components of Apps / Software in Mac OS X
We’ll use Terminal and mdfind, though other command line search tools can also work for this purpose. The general syntax to use is the following command with the -name flag*:
mdfind -name "application name"
*You can also use the broadest possible search without the -name flag but your results may be less accurate, whether that’s useful is up to you
For example, to find associated files and components with Teleport, the Mac OS X keyboard and mouse sharing utility for controlling multiple Macs with a single keyboard, you could use the following:
mdfind -name "teleport"
This broad search should return everything on the Mac that is associated with the name of the application – this does not mean you should delete everything returned by the search though. Carefully example everything that is found, you may need to adjust your search parameters to determine if you’re finding all the necessary components of the application and/or software.
Generally speaking, you’re looking for binaries, the .app files, and remnant pieces of the software, like plist files, preferences, caches, daemons, and other accessory files and components associated with many apps in OS X. Application components may appear in a wide variety locations, including but not limited to the following file paths:
/Applications/[Application]
~/Applications/[Application]
~/Library/Application Support/[Application]
~/Library/Preferences/[Application]
~/Library/Caches/[Application]
~/Library/Containers/Application]
~/Library/LaunchAgents/Application]
~/Library/PreferencePanes/[Application]
~/Library/Saved\ Application\ State/[Application]
~/Downloads/[Application]
/System/Library/LaunchDaemons/[Application]
/System/Library/LaunchAgents/[Application]
To reiterate, this may or may not be a full list of where related files are stored for a given application, this is why it’s important to pay attention to what is reported by the mdfind command. If what you’re looking to completely uninstall is a command line utility, it may have components in a variety of binary folders, whether /usr/bin /usr/sbin or others,
Completely Removing Apps & Remnant Application Components
Remove only the related files that are appropriate to delete, there is no universal answer to this which is why you need to pay attention to the files that are found through mdfind utility. Be sure you know exactly what file it is that you are deleting and why you are deleting it – as mentioned already, this is really intended for expert users with advanced knowledge of Mac OS X – you don’t want to accidentally remove the wrong thing. You can then permanently delete the files with either the rm or srm command, if you’re not familiar with the rm command, it’s not reversible, so use with caution or you could unintentionally delete something important.
If you’re not incredibly confident in what you’re doing, you should at least back up the Mac before going any further, which is a good idea to do regularly anyway.
Here’s an example of the rm with a sudo prefix to allow for administrative privileges, removing some fictitious files at imaginary locations (yes, these are made up to prevent copy/pasting and misuse of the ridiculously powerful rm command):
sudo rm -rif ~/Directory/Component/Removeme.pane
sudo rm -rif /TheLibrary/LaunchDaemons/sketchyd
sudo rm -rif /usr/sbin/crudrunner
sudo rm -rif ~/Download/sketchydaemon-installer.tgz
sudo rm -rif ~/.Tofu/Preferences/com.company.crudrunner.plist
Again this is an example, the ‘sudo rm -rif’ component is real but none of the directories or files are, it’s going to completely depend on what you find with mdfind and what you determine should be removed.
Manual App & Component Removal in OS X via Terminal: The Condensed Version
Impatient? Command line expert and know exactly where to find junk? Here’s the condensed version, sans explanation – don’t jump to this if you don’t know what you’re doing:
- Trash the known application files
- Launch Terminal and use the following syntax to find remnant components
- Remove associated files from system locations with rm:
- Repeat as necessary with associated component files returned by mdfind
mdfind -name [application name]
sudo rm -rf /Whatever
You can also choose to remove the components from the GUI with the Finder. Trashing user cache files and other ~/Library/ components is easily done through the Finder of OS X, whereas digging around in deep system folders or unix directories like /usr/sbin/ with the GUI is not particularly recommended. This process does work to remove default software that comes bundled with Mac OS X, though without a very compelling reason to do so, that is not recommended.
If any of this seems over your head, it’s because this is really much more advanced than what an average Mac user would ever need to do it. For the vast majority of Mac users, it’s best to resort to a more traditional app uninstall methods, or use a thorough application uninstaller utility like AppCleaner, which is free and basically does the same search process but through an automated graphical user interface.
How to find all files of App / Software?
Thanks for the article. This mdfind command is an amazing new piece of knowledge for me. I didn’t use the rm command but i actually just went into Finder, made a copy of the files just in case i make a mistake and proceeded to deleted the files in my library. Now i don’t have an annoying process running in the back of my mac from an old app I don’t use.
Thank you!!
I’m getting a app cleaner logo on my android screen. I want to remove it permanently
GREAT ARTICLE – HELP ME A BUNCH
To all you sissies complaining about sudo/rm/whatever:
using anything in terminal is clearly not for you
please throw your mac out the window
and buy a win95 pc lol
THANKS
You really need help!
I agree this article is only 90% there technical-wise; both w.r.t the Unix stuff (especially the rm switches) and the Mac stuff (you should not remove anything under /System). Ever. The directories related to launchd are:
/Library/LaunchAgents
/Library/LaunchDaemons
They are the global (non-OS X) related directories for launchd stuff. You will not find application-related launchd .plist files under /System/Library.
If you’re going to “get down & dirty” – get it right. 100% right.
I used it to remove Skitch and it worked fine.
You complain about how to remove software from command line, the article, which is accurate and how you could remove apps from the command line, then you offer nothing to improve it. So you’re just a typical complainer with no solutions or propositions for improvement. That is not very helpful. If you have a better idea, let the world hear it. If you have a better solution, share it. Don’t just complain.
And if you use ‘mdfind’ you might find app components in /System/Library/LaunchAgents/ what do you say about that? Nothing?
I did share the “better” (correct) solution. I said, there were no (3rd party/non-system)-related files under /System/Library. Instead, you will find those files under /Library. So – by implication, the “better solution” is to use the directories:
/Library/LaunchAgents and
/Library/LaunchDaemons instead of
/System/Library/LaunchAgents and /System/Library/LaunchDaemons
It’s not my fault you can’t understand what I wrote, or its full implications.
The remove command should be rm -ri. The man page says that -f overrides any previous -i, meaning it won’t prompt before deleting any files. With just rm -ri, it will prompt whether each file should be deleted. Then it can be used like rm -ri $(mdfind program-name), and it will prompt whether each file should be deleted.
Thanks for the article mate! You should consider doing away with all the “advanced user” warnings and lead folks with minimal CLI experience to the command sudo rm or maybe a chmod -r as well! Make them “super users” real quick. Maybe teach them to read full articles before deleting things.
Not up to using terminal so tried deleting Mac Keeper app using app cleaner all went well but now its stuck in the trash bin which I can’t empty it keeps telling me that the operation can’t be completed because the item MacKeeperATd” is in use .
Any ideas?
You would need to kill the active process so that it can be deleted, in your case that would be killing “MacKeeperATd” process through Activity Monitor or Terminal (killall MacKeeperATd)
This doesn’t seem like that “rare” of a method, since the easy way doesn’t work to delete any of the built-in apps.
Not trying to be dweebish, just seeking how to reverse this process. Years ago I disabled iTunes via terminal, and apparently with Yosemite it’s causing some issues. So my question is how to find and delete the disabling code if anyone here knows. Thanks.
incoherent bollocks. mac is a piece of tired crap. ipad should replace this old hardware and junk os. and your notes here are nonsense
Ian, it’s ok if this is too complicated of way to uninstall Mac apps for you, that’s why this is an advanced article aimed at technical users with in depth computer knowledge and experience with using the command line. That’s also why the first sentence of the article mentions an easy way which is directed at people like yourself who are more comfortable with an iPad and are utterly baffled by a technical process.
https://osxdaily.com/2011/06/20/uninstall-mac-applications/
Use that way, it’s easy, but reading comprehension is still important.
Excellent write-up! This is just what I needed. Its nice to see a blog that doesn’t shy away from getting technical.
The issue with this article is if you are well enough versed in unix like OS’s to be save using rm -rf type commands, you should be well enough versed in how to remove applications in OS X.
Finding what to remove is the remedial part of this article. Not killing your system with rm -rf is the tricky part.
What a terrifying article. The author clearly doesn’t know how the “rm” command works (or he wouldn’t recommend using the “-r” flag on individual files). As for recommending people search the file system for all files with a certain string in them as candidates for deletion, that’s just arrant lunacy. You will almost certainly delete something that’s needed for the smooth running of your system or one of the apps on it.
I’ve hacked Unix for 30 years and even I wouldn’t try some of the things this article recommends. Unless you know *exactly* what effect any Terminal command that starts with “sudo rm …” is going to have, look for an uninstaller or put the 10¢ worth of disk space that’s wasted down to experience.
Hi Bozo,
Did you skim the article? This is an article aimed at advanced users, that is clearly stated with numerous mentions in the tutorial intro explaining that this is intended for advanced users who have extensive knowledge of OS X. That would be users like myself, and perhaps yourself too, assuming you were comfortable with the rm command.
And yes, I’m aware of how the rm command works. You may need to use the -r flag here so that you can remove a directory, which again, without knowing what you’re doing, and what you’re looking to delete, may or may not be the case.
I do see your point, so I added some bolding to the second paragraph making it even more obvious that this is intended for advanced users only, that should help readers who skim, at least it stands out a bit more.
Nice name BTW!
so you know than, that the 10 worth does that just in the background LOL
Hello,
How can one have all the results of mdfind deleted from only one step. For example let’s say you get 100+ hits of mdfind. In this scenario you’d have to manually remove all the 100 results one by one. How can one avoid this?
Ty
That’s exactly what you’re NOT supposed to do, did you read the article?
Do NOT delete everything, you have to use DISCRETION to DETERMINE what files should be deleted away from the many that shouldn’t.
Reading comprehension is really bad in America?
I don’t think it’s a good idea for a common user to use ‘sudo rm -rf ‘ command…
Agreed, this is intended for advanced Mac users who are comfortable with the command line.
Too bad there isn’t an -uninstall option so it was like
mdfind -name “teleport” -uninstall
Then have it list the files and ask to remove them and simply type yes.
Sounds like an “Enhancement Request” to Apple!
That would be great.
But for most apps, removing from /Applications/ is enough anyway. So thats’ good.
There is a free utility called AppCleaner, which does exactly that.
Thanks a ton – I have also been looking for this uninstall app. I used to have this installed on my old mac and totally forgot the name of it.