I recently reinstalled Ubuntu (actually updated from 16.10 to 17.10) and while my Home directory is intact, any packages that were installed by me earlier are gone (not installed). However, it seems that their files are still on the disk. For example, I have the package
zsh installed earlier, and now it's not installed. Still, there is a
/usr/share/zsh folder containing lots of files.
I actually like the idea of starting from scratch with my packages, but I'm low on disk space. How can I completely remove all files leftover from the packages of the previous installation, without erasing any files needed for currently installed packages?