---
title: "apt-mirror-pro CLI"
description: "Ubuntu/Debian APT mirror switcher with speed tests, regional mirrors, and DNS helpers for restricted networks and flaky egress."
author: "Mohammad Pouya Ghourchiani"
canonical: "https://ghourchiani.ir/projects/apt-mirror-pro"
image: "https://ghourchiani.ir/og/mark-square.png"
updated: "2026-09-22"
lang: "en"
generated: "2026-11-19"
---
# apt-mirror-pro CLI

> **TL;DR:** Ubuntu/Debian APT mirror switcher with speed tests and DNS helpers.

`apt-mirror-pro` is a Bash tool to switch Ubuntu/Debian APT mirrors — 28+ presets, Auto speed testing, backups — plus DNS helpers for picking a resolver that can reach developer hosts on restricted networks.

## Direct answer

Run `mirror.sh` as root, pick a mirror or Auto, keep a single active channel so APT does not warn about duplicates. Use DNS tools when registries and git hosts fail for the wrong reason.

## Notes

Supports classic `sources.list` and deb822 (`ubuntu.sources` / `debian.sources`). Optional one-liner install from the repository README; prefer cloning so the `mirror` symlink can be created under `/usr/local/bin`.

## Links

- Repository: https://github.com/BTF-Kabir-2020/apt-mirror-pro
- One-liner install: `bash <(curl -fsSL https://raw.githubusercontent.com/BTF-Kabir-2020/apt-mirror-pro/main/mirror.sh)`
