Posts

Showing posts from January, 2016

[HOW TO] Get a list of packages that use most space

Let's learn how to get a list of installed packages that use most space, with sizes shown as "human readable mode". Install Fist we need to install debian-goodies . Open a terminal window and run: sudo apt-get install debian-goodies -y List top 10 packages $ dpigs -H 258.2M nvidia-340-updates 171.7M google-chrome-stable 154.4M wine-staging-amd64 145.2M wine-staging-i386 144.9M linux-image-extra-3.13.0-74-generic 137.0M blender 117.7M wine1.6-amd64 116.2M krita-testing 112.7M wine1.6-i386 111.0M libreoffice-core List top N packages $ dpigs -H n 5 258.2M nvidia-340-updates 171.7M google-chrome-stable 154.4M wine-staging-amd64 145.2M wine-staging-i386 144.9M linux-image-extra-3.13.0-74-generic

[HOW TO] Save disk space removing old linux-headers

Even though old kernels have been removed (as described in this preview post ), linux-headers packages may still be left behind using precious disk space. Here's how to remove them. Recovering disk space Open a terminal window and run: current_kernel=$(uname -r) && dpkg-query -W -f='${Package}\n' 'linux-headers-[0-9].[0-9][0-9]*' | egrep -v ${current_kernel%-generic} | xargs sudo apt-get remove -y Running this command I was able to recover a little bit more than 1GB of disk space: After this operation, 1075 MB disk space will be freed. Disclaimer Use this command at your own risk. To see what the command will remove just run the first part, without apt-get remove : current_kernel=$(uname -r) && dpkg-query -W -f='${Package}\n' 'linux-headers-[0-9].[0-9][0-9]*' | egrep -v ${current_kernel%-generic}