Delete downloaded package files from the apt cache
apt clean cache | var cache apt is full | free up space on root partition | apt | disk-space | cleanupCaution: This command changes the system. Understand what it does before you run it.
du -sh /var/cache/apt/archives && apt cleanFirst shows how much space the downloaded .deb files under /var/cache/apt/archives take up, then deletes them. Installed packages are not affected, apt simply downloads the files again when needed. Useful as a quick space gain when the root partition fills up.
Note: apt autoclean only deletes package files that are no longer available in the sources, making it the more conservative option.
Also searched as
- apt clean cache
- var cache apt is full
- free up space on root partition