netselect-apt
Automatically find the fastest Debian mirror and create sources.list
TLDR
SYNOPSIS
netselect-apt [options] [distribution]
DESCRIPTION
netselect-apt automatically finds the fastest Debian mirror and generates an appropriate sources.list file. It downloads the official Debian mirror list, optionally filters by country, tests each server for latency using netselect, and creates a sources.list with the fastest mirror.This is particularly useful when setting up new Debian systems or when experiencing slow package downloads from the default mirror.
PARAMETERS
-a, --arch arch
Use mirrors containing the specified architecture. Defaults to the architecture reported by dpkg.-c, --country name
Limit mirror selection to a specific country (ISO-3166 code or full English name).-f, --ftp
Use FTP mirrors instead of HTTP.-n, --non-free
Include non-free section in the generated sources.list.-o, --outfile file
Write output to the specified file instead of sources.list.-s, --sources
Include deb-src lines for source packages.-t, --tests num
Number of hosts to test for mirror validity (default 10).-i, --infile file
Use a local mirror list file instead of downloading one. Must be in mirrors_full format.distribution
Debian release name: stable, testing, unstable, experimental, or a codename (e.g. bookworm, trixie). Default is stable.
CAVEATS
Requires root privileges for ICMP network testing. Network conditions vary over time; run periodically to find the currently optimal mirror. The generated sources.list should be reviewed before replacing the system file. Mirror latency may not reflect actual download speed for large files.
