These commands might be different from the commands used in your Linux distribution. For Ubuntu: Use the commands below.
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get autoclean
These commands are needed to remove packages (dependencies) laying on the system after a particular package has been uninstalled.