How To Clear Apt Cache – /var/cache/apt/

I have a few limited space (20 gig) servers doing small jobs for us. If these have been upgrade over several major releases then the apt cache can get quite large. I used ncdu to see which folders and files are taking up space. To clear you apt cache from the command line type:

How to change /etc/apt/sources.list to use local apt-cache server in a single sed command

I’ve just installed an Ubuntu apt-cache server on our local network to speed up downloading packages each time we install or upgrade an Ubuntu computer. However, changing all the /etc/apt/sources.list file for every computer in the office is a real pain. Here is a simple command using sed which does this automatically for you: The … Read more