# A quick shout-out to apt-smart

I recently had the pleasure of performing a release upgrade on an old Ubuntu server. The upgrade kept failing due to issues with the mirrors that were listed in `/etc/apt/sources.list`. Rather than resolving the issue by manually editing the sources, I stumbled across apt-smart, which auto-updated my mirror list, optimizing for speed.

Check it out here: [https://github.com/martin68/apt-smart](https://github.com/martin68/apt-smart)

After installing the package, I let apt-smart automatically fix my broken mirrors:

```bash
# Discover available mirrors, rank the mirrors by connection speed and 
# update status and update /etc/apt/sources.list to use the best available mirror.
sudo apt-smart -a
```

A few minutes later I was running the release upgrade without issue.

![](https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExYm90Z3c0MGRjZGdjY2F2MzdkemdlY2lydGl5OTdodTkzeTBwaDM1MiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/fkD36jhiqzJ9m/giphy.gif align="left")

## Latest Docs

* [https://apt-smart.readthedocs.io/en/latest/](https://apt-smart.readthedocs.io/en/latest/#)
