There are two programs for ubuntu or Debian that can clean un-necessary files in ubuntu. First program is deborphan and another is GtkOrphan . Also there are two programs (autoremove and autoclean) that you can use to delete partial and orphan files.
To install deborphan follow these steps
sudo apt-get install deborphan
You’ll be prompted for root password before installation begins. Enter the password and installation will proceed.
To delete un-necessary data packages use this command :
sudo deborphan --guess-data | xargs sudo apt-get -y remove –purge
To delete un-necessary data libraries use this command :
sudo deborphan | xargs sudo apt-get -y remove –purge
There is also alternate program which works in similar way like GTKorphan. To install GTKorphan follow these steps :
sudo apt-get install gtkorphan
Once installation is complete you can access GTKOrphan from Menu : System –> Administration –> Remove Orphaned Packages. You’ll be asked for root password. Enter the password and it’ll start cleaning up files.