For anyone reading this on a Debian-based system, you can get a good start without risking removing anything important like this:
- Run
apt-mark showmanual
, and copy any package names you don’t think you need into a list. - Run
apt-mark auto <pkg1> <pkg2> ...
- Run
apt autoremove
Like @pathos said, that’s the list from the previous step. Because you’re autoremoving, it will only remove packages that aren’t dependencies of any other packages still installed.