Debian - Free up some disk space

October 2016

Under Debian (for most Linux distributions) you can free up some disk space, simply by deleting the configuration files resulting unistallation of packages.
The commands to be used are:
  • dpkg --purge $(dpkg --get-selections | grep deinstall$ | cut -f 1)
  • dpkg --purge $(dpkg --get-selections | awk '$2 ~ /de/ { print $1 } ' )

Remove downloaded packages (installation files)

  • aptitude clean

Removing orphan packages

  • dpkg --purge $(deborphan)

Related :

This document entitled « Debian - Free up some disk space » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.