Ubuntu: how to use a local mirror when performing a release upgrade

If you use Ubuntu, you are surely familiar with the Release upgrades. As Ubuntu gets a new version every six months, it is probable that you had to upgrade at least once.

Where I work we manage several Ubuntu machines and we decided to set up a local mirror for the updates. The mirror is synchronized daily with the official Ubuntu repositories so we always have the fresh packages at home.

When doing a release upgrade however, Ubuntu does by default not use the local mirror, relying on the official Ubuntu repository archive.ubuntu.com.

If you want to use your local mirror that already has all the needed packages for the version of Ubuntu you want to upgrade to, you have to set an environment variable to tell that it is OK to use third-party repositories. The following command will do just that:

export RELEASE_UPRADER_ALLOW_THIRD_PARTY=1

note that the spelling is correct as it is (UPRADER).

When you issue the do-release-upgrade command, the new packages will be downloaded from you local repository and your upgrade will hopefully be much faster than usual.

Please note that you local repository should have all needed packages. An example of configuration (mirror.list) is the following. It is set to synchronize again the Ubuntu mirror provided bu the TU Dresden, Germany:

# Ubuntu Wily (15.10)
deb http://ubuntu.mirror.tudos.de/ubuntu wily main restricted universe multiverse
deb http://ubuntu.mirror.tudos.de/ubuntu wily-security main restricted universe multiverse
deb http://ubuntu.mirror.tudos.de/ubuntu wily-updates main restricted universe multiverse
deb http://ubuntu.mirror.tudos.de/ubuntu wily-proposed main restricted universe multiverse
deb http://ubuntu.mirror.tudos.de/ubuntu wily-backports main restricted universe multiverse

deb-i386 http://ubuntu.mirror.tudos.de/ubuntu wily main restricted universe multiverse
deb-i386 http://ubuntu.mirror.tudos.de/ubuntu wily-security main restricted universe multiverse
deb-i386 http://ubuntu.mirror.tudos.de/ubuntu wily-updates main restricted universe multiverse
deb-i386 http://ubuntu.mirror.tudos.de/ubuntu wily-proposed main restricted universe multiverse
deb-i386 http://ubuntu.mirror.tudos.de/ubuntu wily-backports main restricted universe multiverse

deb-src http://ubuntu.mirror.tudos.de/ubuntu wily main restricted universe multiverse
deb-src http://ubuntu.mirror.tudos.de/ubuntu wily-security main restricted universe multiverse
deb-src http://ubuntu.mirror.tudos.de/ubuntu wily-updates main restricted universe multiverse
deb-src http://ubuntu.mirror.tudos.de/ubuntu wily-proposed main restricted universe multiverse
deb-src http://ubuntu.mirror.tudos.de/ubuntu wily-backports main restricted universe multiverse

Good luck with your Ubuntu upgrade!

Advertisements
Ubuntu: how to use a local mirror when performing a release upgrade

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s