Using apt-cacher-ng

I used approx for some years now, it worked great until it didn't work.
Now I live behind a crappy link at home, timeouts to external repos are common and approx will leave you with an empty deb file, and your apt-get client will complain :(

apt-cacher-ng is simple and it will work right away (after install), but I have many VMs and images which expect to find approx and it's URLs, I don't want to change them

Change the port to 9999 was the easy part, then i have to map the old repos to the new ones

A picture is worth a thousand words


Will map to

Remap-debsec: file:debian-security /debian-security ;
Remap-deb: file:debian /debian ;
Remap-ubu: file:ubuntu /ubuntu ;
Remap-debcloud: file:debian-cloud-archive /debian-cloud-archive ;
Remap-ubucloud: file:ubuntu-cloud-archive /ubuntu-cloud-archive ;

I had to comment out the default maps as they fail for me

#Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
#Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives