In my last Tech Tails article we discussed a few reasons why cleaning up your Mac regularly is good to do and how uninstalling software is different than doing so on a Windows machine. You may recall Apple’s macOS does not include a built-in uninstaller tool showing a list of all of your installed software like a Windows machine with the add/remove programs tool found through Windows Control Panel. In addition very few software manufactures offer packaged un-installers with their applications for macOS because most macOS applications are contained within themselves and don’t run background components or alter system settings files. This is what makes uninstalling software in macOS generally a straightforward procedure. Use an un-installer packaged with the application if there is one or locate the application, move it to your trash can empty it and your done. Simple, right?
Well, there are some instances where removing preference files, support items, and sometimes hidden files or kernel extensions are necessary especially when you are dealing with corrupt software installations that you are trying to reinstall and get working again. So to follow-up on my last article, I wanted to go through the various locations to search for files and folders left behind that you may need to delete. This can be dangerous as you are modifying system-level locations, so as always, back up before you do this!
For removing preferences and application support files, there are two locations within macOS that you should check. Both are found within your Library folder, the first at the top level of macOS and the other is inside your Home Folder. Let’s first start at your top level /Library.
You can access this directory from either your Finder menu by clicking on Go >Go to Folder… or by using the keyboard shortcut Command + Shift + g and entering /Library. Once there, you’ll need to look for and remove any files or folders which contain the name of the program or the software manufacturer in the names you’re looking to remove.
I would first search these following locations and look for folders containing items with the name you are looking for:
- /Library
- /Library/Application Support
Next check the following folders for single files to full folders containing the name you are looking for along with .plist files that follow the naming convention com.“manufacture_name”.“program_name”.plist:
- /Library/Preferences
- /Library/LaunchAgents
- /Library/LaunchDaemons
Now we want to check the following folder for any .prefPane files relating to the name of the application you are removing;
- /Library/PreferencePanes
Generally I find that most software does not use LaunchAgents, Preference Panes or Startup Items; only items that control system behavior or to keep processes running in the background do. I like to check one final location to be 100% sure and remove anything with the name I am looking for:
- /Library/StartupItems
We can now move to the Library Folder within your Home Folder and search the same set of folders as you did above and repeat the step of removing any similarly named files or folders. This folder is hidden, so you can hold down Option and click on the Go menu item in Finder to find it or use Go to Folder… and enter ~/Library.
- ~/Library
- ~/Library/Application Support
- ~/Library/LaunchAgents
- ~/Library/Preferences
- ~/Library/PreferencePanes
- ~/Library/StartupItems
Empty the Trash to complete the process. If you get a message that an item is “in use and can’t be deleted” reboot the Mac, then try to empty the trash again.
For the majority of applications that’s all you need to remove and you’re done. But what about the exceptions? In these cases you need to look at kernel extensions and hidden files. Working with both kernel extensions and hidden files the names sometimes may not be apparent. Please do some research online about the components for the specific software you are working to remove.
Applications that do run processes in the background, like antivirus or device sync programs, can often times add one or more kernel extensions as part of its installation.
Before explaining how to search for and remove kernel extensions I would first like to give a public service announcement on dealing with kernel extensions. They are necessary for correct operation of your system. Do not move or delete any items unless you have the ability to recover from changes made by booting from a second Mac, bootable drive, or recovery partition and restoring changes made to the hard drive. Please, on no account should you move or remove files without understanding the consequences of what you are doing and without a complete backup of your system on an external disk.
You are going to be looking for file names that end with the extension .kext and contain the name of the software or manufacturer in the name. As a precaution and a second layer of protection along with your backup, drag any .kext files that you are looking to delete to your desktop to create a backup copy. Now you can safely move the original to the trash. Before actually empty your trash, reboot your system and see if the reason why you were trying to remove these files went away. If your problem still persists, then restore those files and try looking again. Once you find the culprit extension/s, you can now complete the process by emptying your trash. You can access the below directory where extensions are installed like we did in my other examples above.
- /System/Library/Extensions
The last items we want to check for in a complete software removal process are Hidden files. Hidden files are items whose name starts with a period “.” and unfortunately, they do not display by default in the Finder. Programs sometimes use hidden files for authentication purposes or preserving the state of a utility and many are located in your home folder.
Here you will need to use the built in Terminal with macOS located in Applications/Utilities to remove any hidden files that may be in question.
Using the following set of commands will navigate to your home folder (~), list all contents, and then delete the hidden file for the software you are looking to remove;
$> cd ~
$> ls -al
$> sudo rm .“file_name”
(Replace “file_name” to the hidden file to the software you are removing)
When using sudo, please have your admin password handy as you will be required to enter it to run the command and don’t be alarmed that you don’t see any characters or dots appearing; this is normal behavior in Terminal.
I know this is a lot of information to digest and dig into therefore I will discuss some software applications that are available to aid in automating the process of uninstalling and cleaning up your Mac in Part 3, the final segment in this series.