Score:0

How do I update to a specific version of ubuntu instead of the latest

ru flag

I'm attempting to update a couple of my servers from 16.04 to 18.04. I run sudo apt-get dist-upgrade then sudo do-release-upgrade. It was my understanding this would take my server from the version it's on to the next version, not the latest. One went to 18.04, One upgraded to 20.04. How do I control what the version being upgraded to is?

David avatar
cn flag
There is no Ubuntu 18 or 20
user535733 avatar
cn flag
The question, as currently written, is unanswerable due to a false assumption: The `do-release-upgrade` command will indeed advance you only to the next release (or LTS) of Ubuntu, if available. There is no need (or option) to "choose" since `do-release-upgrade` of a properly-maintained system with 16.04 sources can have only one result (18.04). Since that did not happen on one of your systems, it suggests that system's starting point was not, in fact, 16.04. Your use of `dist-upgrade` suggests that you were perhaps using different instructions than I might recommend.
in flag
You cannot. The update process will aim to bring you to the most current release by design. If, for some reason, you need a specific release of Ubuntu, you will need to build it manually using an `.iso` of that specific version. Be sure to tell the installer to **not** grab updated packages, otherwise you will end up with the most recent version of a release.
Not An Alien  avatar
ru flag
@user535733 when I run lsb_release -a prior to upgrading it shows 16.04. After upgrading with do-release-upgrade it skips 18.04 and goes straight to 20.04.
user535733 avatar
cn flag
`lsb release` shows you what is in that particular field. It does not check to see if you *really* have 16.04 sources (or lots of other possible problems). `do-release-upgrade` checks your sources (not `lsb release` output), and pulls the next release (anx only the next release) based upon those sources.
Not An Alien  avatar
ru flag
I did not realize that, Good to know.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.