Maintaining the Debian Package Cache
You want to keep your package cache and package lists tidy and up-to-date, so that apt will work correctly and not encounter bogus dependency problems?
Use apt and dpkg.
Remember to run apt-get update after making changes to /etc/apt/sources.list, and run it periodically to keep package lists current.
To look for downloaded, uninstalled packages, use:
$ dpkg —yet-to-unpack
To check for broken dependencies, use:
# apt-get check
To remove cached packages that are no longer needed, use:
# apt-cache autoclean
To remove all cached packages, use:
# apt-cache clean
To show partially installed packages, use:
$ dpkg —audit
Your package cache can easily consume tens, or even hundreds, of megabytes. See for yourself in /var/cache/apt/archives. To conserve storage space, set up a local package cache for your network.
