Unlike on Windows, most applications installed on your Mac won't leave a mess if you uninstall them. They generally don't make permanent changes to your settings, don't use background components and their leftovers aren't harmful, so simply deleting them from the Applications folder will get the job done. However, there are some cases when things get tricky and you need to force a specific program to completely purge from your computer. Here is some advice on how to completely remove unwanted applications without damaging your system.
Use a specialized Uninstaller!
Just use AppZapper, AppCleaner (free) or CleanGenius and your problems will be solved with just a few mouse clicks. These tools are generally very easy to use and all you have to do is to point them at the program that you want to delete. They will automatically find all the hidden files, settings or any other kind of leftover and clean it along with the main application.
So, you're the "do-it-yourself" kind of guy, are you?
Since you are still reading, I'm guessing that you want to know how to manually remove your unwanted programs. OK, I'll tell you. The first thing you need to do is to go to the Applications folder (that is where all your applications are installed by default), then drag the targeted program to Trash. Don't be fooled by the fact that you only see the icon. If you right click it and select "Show Package Content", you will see that this small icon contains all the application's files and folders packed into a simple launcher.
The next step is to go the Library folder and remove the preferences and support files used by the targeted application. As you can see from the picture, these two Library folders are placed in separate locations. The files in question can be saved in both these folders so you won't be able to take a shortcut. Make sure you have a backup, just in case you inadvertently delete something that you weren't supposed to. Then search for the files with the same name as the application that you want to delete in all these folders: /Library, /Library/Application Support,
/Library/Preferences, /Library/LaunchAgents, /Library/LaunchDaemons,
/Library/PreferencePanes, /Library/StartupItems. If you find any, remove them. Most applications will be completely deleted after this step is completed.
Now it gets complicated.
If the unwanted program still manifests its presence on your system you should take a breather and make sure you have the ability to redo any of your actions either by using a secondary drive or another Mac PC. The only way there could be any leftovers is if the application in question uses kernel extensions or hidden files. My advice is to Google the program to see if other people had the same problem and solutions they recommend. If that fails, go to /System/Library/Extensions, browse through the files that have the .kest extension, and find the ones that have the same name as the unwanted software. Before deleting them, make a backup in a different folder so you can copy them back in case they were not the source of your problems. Pay attention, that the files in the Kernel folder are very important as they enable your system to function properly: deleting the wrong one will most likely cause your Mac to crash.
The simplest way to deal with hidden files is to open the Terminal and paste this text: <<defaults write com.apple.finder AppleShowAllFiles YES >> (without "<<" and ">>"). After pressing the return button, right click on the Finder icon while holding the Alt button and select Relaunch. Now you can see all the hidden files as they have lighter texts and icons than usual ones. If any of your hidden files has the same name as the application you are trying to get rid of, remove it. When all these steps are done, any unwanted program should be completely removed from your Mac.