vqzsmg
Last Updated: February 25, 2016
·
903
· victorbjelkholm

Change APT country quickly in /etc/apt/sources.list

I'm living in Barcelona, Spain. Here, the closest mirror for APT is cat.repo.com (cat is short for Catalunya) but Ubuntu forces me to use es.repo.com which is the spanish mirror. To quickly change this to speed up download speed and apt-get update, I use sed.

sed -i 's/es\./cat\./g' /etc/apt/sources.list

You can replace es. and cat. with the country you want to change from and to.

Now enjoy a much faster apt-get update command and installation of packages from APT :)