stfl / apt-fast-mirrors

8 stars 3 forks source link

To fetch the fastest mirrors and add the 10 fastest to the MIRRORS variable in /etc/apt-fast.conf, run:

+BEGIN_SRC bash

sudo ./af-mirrors.py

+END_SRC

The fastest mirror is also added to /etc/apt/sources.list.d/sources_<repo>.list.

** Prerequisites

Install apt-fast according to the [[https://github.com/ilikenwf/apt-fast?tab=readme-ov-file#installation][official instructions]].

*** Install dependencies

To ensure the script functions as intended, install lsb-release, netselect-apt, and netselect:

+BEGIN_SRC bash

sudo apt-fast install lsb-release netselect-apt netselect

+END_SRC

**** Netselect on Ubuntu

netselect and netselect-apt are not available in the Ubuntu repositories by default. They can be installed by downloading the Debian packages and installing them manually:

+BEGIN_SRC bash

wget http://ftp.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-30.1_amd64.deb wget http://ftp.debian.org/debian/pool/main/n/netselect/netselect-apt_0.3.ds1-30.1_all.deb

sudo dpkg -i netselect_0.3.ds1-30.1_amd64.deb netselect-apt_0.3.ds1-30.1_all.deb

+END_SRC