I have an internal apt repo located in /etc/apt/sources.list.d/private.list that looks similar to this:

deb http://apt.company.com/ubuntu trusty main

When we upgraded from 14.04 to 16.04 and the upgrade process commented out that line because we are now on xenial.

Is there a way to variablize the release name so that we don't have to go back and fix all of these when we upgrade to 18.04?

There is no versioning in our internal repo.


What you could do is to change it to something like stable, instead of trusty so it won't be replaced druing upgrade. However, every custom repository is disabled during dist-upgrade. Consider using ansible or any other automation tool to make such changes in case of upgrades like this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.