# Linux Mint mirror (pkg.shecan.ir)

> Mirror of packages.linuxmint.com (Linux Mint 19 to 22 and LMDE: dists/<codename>/, pool/) for apt. The Ubuntu base of Linux Mint comes from mirror-ubuntu, the Debian base of LMDE from mirror-debian.

- Upstream: packages.linuxmint.com
- Mirror URL: <https://mirror-mint.pkg.shecan.ir/>
- Clients: apt
- Service status: <https://pkg.shecan.ir/status.json> (key `mint`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/mint/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/mint.json>

## Limitations

- apt still verifies Mint's signature (linuxmint-keyring is installed on every Mint system).
- If another mirror was chosen in Software Sources, the sed command replaces it as well; the Software Sources tool may later offer to switch back.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### apt: persistent (user- or system-wide configuration)

Run, Linux Mint 21 and 22 (linux)

```sh
F=/etc/apt/sources.list.d/official-package-repositories.list
sudo cp $F $F.bak
sudo sed -i -E 's#^deb [^ ]+ ([a-z]+ main upstream)#deb https://mirror-mint.pkg.shecan.ir \1#; s#^deb [^ ]+ ([a-z-]+ main restricted)#deb https://mirror-ubuntu.pkg.shecan.ir/ubuntu \1#' $F
sudo apt update
```

Undo / restore the default, Linux Mint 21 and 22 (linux)

```sh
sudo mv /etc/apt/sources.list.d/official-package-repositories.list.bak /etc/apt/sources.list.d/official-package-repositories.list
```

Run, LMDE (linux)

```sh
F=/etc/apt/sources.list.d/official-package-repositories.sources
sudo cp $F $F.bak
sudo sed -i -E 's#^URIs: https?://[^ ]+/debian-security/?$#URIs: https://mirror-debian.pkg.shecan.ir/debian-security#; s#^URIs: https?://[^ ]+/debian/?$#URIs: https://mirror-debian.pkg.shecan.ir/debian#; s#^URIs: https?://packages\.linuxmint\.com/?$#URIs: https://mirror-mint.pkg.shecan.ir#' $F
sudo apt update
```
