Where APT keeps downloaded .deb files, how apt clean, autoclean and autoremove differ, and what is safe to remove on Debian and Ubuntu.
The APT package cache is the folder /var/cache/apt/archives, where apt and apt-get keep downloaded .deb package files on Debian, Ubuntu and related distributions. 'apt-get clean' removes all cached packages, 'apt-get autoclean' removes only those that can no longer be downloaded, and 'apt autoremove' removes packages that nothing needs any more.
clean removes everything except the lock file from /var/cache/apt/archives and its partial folder. The packages remain installed; only the downloaded copies go.
autoclean deletes cached package files that are no longer available in the repositories, which keeps the cache from growing forever.
autoremove uninstalls packages that were installed automatically as dependencies and are no longer required, such as old kernels on Ubuntu.
'du -sh /var/cache/apt/archives' shows how much space the cache uses.
du -sh /var/cache/apt/archivessudo apt-get cleanapt-get -s autoremovesudo apt autoremoveLast updated: 2026-10-08
How to find what fills a Linux disk with du and the interactive ncdu, with options that stay on one file system.
How to read df output, why Use% can reach 100% before Avail is zero for normal users, and how to check inodes with df -i.
How to read logs with journalctl, check how much space the journal uses and shrink it safely with --vacuum options.