Uninstalling applications on a Mac is easy in theory: just drag the icon from the Finder to the trash. In practice, however, files are left behind: caches and other hidden stuff can take up hundreds or even thousands of precious megabytes. Pearcleaner is a free, open-source application that can find and remove such files while you uninstall software.
How to Completely Delete Apps on Mac | Leave No Bits Behind | A Quick & Easy Guide
There are other applications for this — we've talked about AppCleaner before, for example. I prefer Pearclearer, all in all, because of its easy-to-understand user interface and a few advanced settings that I haven't seen anywhere else.
To get started, install the application and open it. You will see a list of all the software you have installed on the left panel. You can even see how much space each app takes up. Click on an app and you will see a list of files or folders related to that app.
By default, everything is checked, but you can choose to keep some things if you know what you're doing. For example, if you delete a game but want to play it later, you can keep the saved files. It's nice to have that flexibility. You can also use an app like this to factory reset an app: just delete every file except the app itself. In most cases, that should wipe all your settings and you can start over. I've fixed a few broken apps this way.