5

I am using Ubuntu-14.04 now, and want to upgrade to Ubuntu 16.04.

It will upgrade to the newest Ubuntu-17.10, if I use the commands below:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
do-release-upgrade

Does somebody knows "how can I upgrade Ubuntu to certain version (16.04) without re-installing system?

Thanks a lot.

Arronical
  • 19,893
may
  • 73

1 Answers1

6

Edit the /etc/update-manager/release-upgrades file with your favourite text editor.

Change the value of the Prompt line to be: prompt=lts

The do-release-upgrade command will now only upgrade to the next LTS release, which is currently 16.04. Be aware that the next LTS release 18.04 is due to be released soon, so it may be advisable to do this before that is released.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
Arronical
  • 19,893
  • 2
    Indeed you don't want to be the first person to upgrade from 14.04 to 18.04 on a production system without duplicating data and trying in a test environment first. – WinEunuuchs2Unix Mar 29 '18 at 10:59
  • There are so many changes from 14.04 to 18.04 honestly I would back up my data and do a fresh install of 18.04 . At the very least test 18.04 on a live USB before you upgrade. – Panther Mar 29 '18 at 14:38
  • 2
    The question is not about LTS or not, it's about specifying a SPECIFIC version, like 16 or 18. – Yan King Yin Nov 02 '22 at 10:19
  • @YanKingYin I disagree, when asked the question was regarding moving from one LTS version to another, 14.04 to 16.04. Given this answer was accepted, and other community members have linked it to an LTS upgrade question, I think there's consensus on this. – Arronical Nov 03 '22 at 13:45