Here are five simple tricks for APT, the Advanced Packaging Tool used on Debian and Debian-based distributions like Ubuntu.

View all the packages installed on a system

The easiest way to do it is:

dpkg –get-selections

does not require to be root, and will display all the packages

or use
To list files in packages not yet installed, use this:

apt-file list package

installed via APT. For example, the first lines may look something like:

In order to clean up all these packages you can use, as root:

apt-get clean

This command will remove all the packages except files which are locked. There is another command, apt-get autoclean,
which will remove all the packages which are no longer available in the
repository (older versions of packages which can’t be downloaded any


apt-get install debian-refcard..