APT-MIRROR(1)
β¨ apt-mirror β the mirroring bestie π
okay so bestie, we're in the APT-MIRROR(1) page, and yes it's User Contributed Perl Documentation, and yes that means it's a Perl script, and yes it's still absolutely iconic. sit down, grab a π, let's go.
π NAME π
apt-mirror β the apt sources mirroring tool. that's it, that's the whole vibe. it mirrors apt sources. no cap. β¨
π¦ SYNOPSIS π¦
apt-mirror [configfile]
one optional argument. configfile. she's lowkey minimal but highkey powerful. π
π DESCRIPTION π
so like. apt-mirror is a small and efficient tool that lets you mirror a part of β or literally the whole β Debian GNU/Linux distribution, or honestly any other apt sources you want. it's giving "tiny but mighty". π«Ά
Main features (aka the resume, aka why she's the main character):
- it uses a config similar to APT's
sources.list - it's fully pool compliant β
- it supports multithreaded downloading (yes, parallel, we love a multitasker)
- it supports multiple architectures at the same time
- it can automatically remove unneeded files
- it works well on an overloaded Internet connection π
- it never produces an inconsistent mirror, including while mirroring (this is the slay part, fr fr)
- it works on all POSIX compliant systems with Perl and wget
no cap on that "never produces an inconsistent mirror" line, that's literally what the page says and it's a whole personality trait π
π¬ COMMENTS π¬
so apt-mirror uses /etc/apt/mirror.list as its configuration file. by default it is tuned to official Debian or Ubuntu mirrors. change it for your needs, bestie, it's yours now. π§
once you've set up the configuration file, you may run as root:
# su - apt-mirror -c apt-mirror
or, alternate route: uncomment the line in /etc/cron.d/apt-mirror to enable daily mirror updates. automatic. consistent. obsessed. πβ¨
πΈ FILES πΈ
/etc/apt/mirror.listβ Main configuration file (the blueprint, the blueprint of the blueprint)/etc/cron.d/apt-mirrorβ Cron configuration template/var/spool/apt-mirror/mirrorβ Mirror places here (the actual mirror lives here, that's her home π )/var/spool/apt-mirror/skelβ Place for temporarily downloaded indexes/var/spool/apt-mirror/varβ Log files placed here. URLs and MD5 checksums also here.
π CONFIGURATION EXAMPLES π
the mirror.list configuration supports many options, and the file is well commented explaining each option. so like, read the comments, they're there for you. π«Ά
here are some sample mirror configuration lines showing the various supported ways:
Normal:
deb http://example.com/debian stable main contrib non-free
Arch Specific: (many other architectures are supported)
deb-powerpc http://example.com/debian stable main contrib non-free
HTTP and FTP Auth or non-standard port:
deb http://user:pass@example.com:8080/debian stable main contrib non-free
HTTPS with sending Basic HTTP authentication information (plaintext username and password) for all requests: β this was default behaviour of Wget 1.10.2 and prior and is needed for some servers with new version of Wget
set auth_no_challenge 1
deb https://user:pass@example.com:443/debian stable main contrib non-free
HTTPS without checking certificate:
set no_check_certificate 1
deb https://example.com:443/debian stable main contrib non-free
Source Mirroring:
deb-src http://example.com/debian stable main contrib non-free
note for real: auth_no_challenge sends your username and password in plaintext for all requests. that's literally what the manpage is telling you. know that going in. π
π AUTHORS π
- Dmitry N. Hramtsov
<hdn@nsu.ru> - Brandon Holtsclaw
<me@brandonholtsclaw.com>
and that's the whole page, bestie!! this manual page ships with perl v5.34.0 and was dated 2022-10-07. go mirror something. slay. π β¨π¦
π¦ where this page comes from
- debian bookworm: apt-mirror 0.5.4-2 Β· GPL-2.0-or-later
- debian trixie: apt-mirror 0.5.4-2 Β· GPL-2.0-or-later
- ubuntu noble: apt-mirror 0.5.4-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms