How to clear apt-cacher cache – Ubuntu 14.04 – apt-cacher: Cache Full

We have a server running apt-cacher to help cache Ubuntu repositories.  However, after about 2 years of usage the disk on the server has filled up.  I discovered this after trying to update my Ubuntu desktop and got the following error:

503  apt-cacher: Cache Full

Here is how to clear the apt-cache cache.

sudo service apt-cacher stop
sudo rm -rf /var/cache/apt-cacher-ng/
sudo mkdir -p /var/cache/apt-cacher-ng/{headers,import,packages,private,temp}
sudo service apt-cacher start

One thought to “How to clear apt-cacher cache – Ubuntu 14.04 – apt-cacher: Cache Full”

  1. When doing the same with apt-cacher-ng on debian stretch,I also had to chown apt-cacher-ng:apt-cacher-ng -R /var/cache/apt-cacher-ng.

Leave a Reply to smakks Cancel reply