I have been doing some hard disk maintenance to free up some space. I found some great tools that helped me to get the job done.
Command Line Tools
These are some commands that I use in my terminal to free up some space.
Cleaning Partial Package
This command removes partial package from your system.
sudo apt-get autoclean
Cleaning Unused Locales
For this we need to install localepurge. This is just a simple script to recover disk space wasted for unneeded locale files and localized man pages. It will start upon completion of any apt installation run.
Install localepurge in Ubuntu
This command removes translation files and pages in languages you cannot read. If you want to configure localepurge you need to edit /etc/locale.nopurge
sudo apt-get install localepurge
Removing Orphaned Packages
Remove “orphaned” packages
If you want to remove orphaned packages you need to install deborphan package.
sudo apt-get install deborphan
Open Your terminal and enter the following command
sudo deborphan | xargs sudo apt-get -y remove --purge
These are some awesome GUI tools that helped me remove unnecessary files from my system.
Synaptic Package Manager
We can see residual configuration through Synaptic package manager. Synaptic will now show this option if there is no residual configuration in your computer.
Select the packages that you want to clean by ticking the checkbox and click the ‘apply’ button.
First you need to download latest version of GtkOrphan from using the following command:
Now you have gtkorphan_0.4.2-2_all.deb package you need to install this using the following command
dpkg -i gtkorphan_0.4.2-2_all.deb
At the time of installation you get the following error
dpkg -i gtkorphan_0.4.2-2_all.deb Selecting previously deselected package gtkorphan. (Reading database ... 175891 files and directories currently installed.) Unpacking gtkorphan (from gtkorphan_0.4.2-2_all.deb) ... dpkg: dependency problems prevent configuration of gtkorphan: gtkorphan depends on deborphan (>= 1.7.17); however: Package deborphan is not installed. gtkorphan depends on libgtk2-gladexml-perl; however: Package libgtk2-gladexml-perl is not installed. dpkg: error processing gtkorphan (--install): dependency problems - leaving unconfigured Errors were encountered while processing: gtkorphan
You need to use the following command to fix
sudo apt-get -f install
We can access GTK Orphan through System > Administration > Remove Orphaned Package
Select the orphaned packages that you want to remove by ticking the checkbox and click the ‘ok’ button.
Download bleach bit from here. Get the appropriate *.deb file. Beach Bit is installed in Application > System Tools > Bleach Bit
Select the applications that you want to clean by ticking the checkbox. Click the ‘Preview’ button to see the files that BleachBit deletes. Click the ‘delete’ button to delete them.
Do you know any other techniques to maintain hard disk space in Ubuntu ?
2. Ubuntu Geek