Posts

Showing posts with the label Package Management

[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}

[HOW TO] Find which PPA repository a package belongs to

To find out the repository address for a package we use the policy argument of the apt-get tool. Syntax Open a terminal window and run: apt-cache policy PACKAGE_NAME Example The repository link is presented on the line second to last: apt-cache policy diodon diodon: Installed: 1.0.2-0ubuntu0~quantal1 Candidate: 1.0.2-0ubuntu0~quantal1 Version table: *** 1.0.2-0ubuntu0~quantal1 0 500 http://ppa.launchpad.net/diodon-team/stable/ubuntu/ quantal/main amd64 Packages 100 /var/lib/dpkg/status References How To Find Out To Which PPA Repository A Package Belongs To | Web Upd8