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.

*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:

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):

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.

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

mdfind -name [application name]

Remove associated files from system locations with rm:

sudo rm -rf /Whatever

Repeat as necessary with associated component files returned by mdfind

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 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?

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.

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.

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.

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.

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?

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.

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.

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.

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.

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.

This website and third-party tools use cookies for functional, analytical, and advertising purposes. By continuing to browse the site, closing this banner, scrolling this webpage, or clicking a link, you agree to these cookies. You can review our privacy policy for additional information.I AcceptPrivacy Policy