Skip to content

Instantly share code, notes, and snippets.

@gourneau
Created June 10, 2016 18:09
Show Gist options
  • Save gourneau/d6581c34c7218251ec61ee5906b31230 to your computer and use it in GitHub Desktop.
Save gourneau/d6581c34c7218251ec61ee5906b31230 to your computer and use it in GitHub Desktop.
Use apt-select to select the fastest Ubuntu mirror
# Here is a simple script using apt-select to find the fastest package mirror.
# It will replace (and backup) the existing /etc/apt/sources.list file
sudo apt update
sudo apt-get install python-bs4 wget python
wget https://github.com/jblakeman/apt-select/archive/master.zip
unzip master.zip
rm master.zip
cd apt-select-master
python apt-select.py -m up-to-date
#python apt-select.py -c -t 10 -m up-to-date
sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup && sudo mv sources.list /etc/apt/
cd ~
sudo apt update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment