0

Suppose I have Ubuntu 12.04. I want to upgrade to 20.04, So how do I do this? Is it possible with apt like sudo apt dist-upgrade or it does something else?

muru
  • 197,895
  • 55
  • 485
  • 740
lowhatwo
  • 11
  • 3
  • 1
    You can upgrade via install which would be what I'd consider. It works well with desktop upgrades, but involves restoration of data as system directories are wiped (and server applications often store data within system directories which get erased prior to install), but 12.04 to 20.04 is a huge gap, so you risk some modern apps not knowing how to deal with data files that old (the data files being modified by releases in between, so you'll need to ensure that according to what apps you use yourself) – guiverc Apr 30 '21 at 02:14
  • 1
    You mention system upgrade tools (do-release-upgrade); they are built to take 12.04 to the next release (ie. 12.10) or skipping to the next LTS (ie. 14.04 LTS), however they won't upgrade to EOL releases so that path is gone for you, as you missed the window (14.04 closed in 2017-April or 5 years after initial release). https://help.ubuntu.com/community/EOLUpgrades FYI: As 14.04 ESM is still supported; you could try it, but you'll be using an upgrade path outside what was QA-tested so all testing will be on you... – guiverc Apr 30 '21 at 02:15
  • Another consideration is if you're still using a hdd from 2012 it could be worth getting a new one. Personally, I would install to a new drive, copy across any valuable data. You can boot the old drive if you need to. – pbhj Apr 30 '21 at 06:24

1 Answers1

2

There is no direct upgrade path from 12.04 to 20.04.

It may be possible to do-release-upgrade from 12.04 to 14.04 to 16.04 to 18.04 to 20.04. However, best practice is to test each release --and fix the problems you discover-- before release-upgrading to the next release, so that might be many hours (perhaps days) of testing and troubleshooting and upgrading. Nobody has tested release-upgrading in series like that. If you feel like testing it, let us know what happened.

It seems unlikely that a dist-upgrade from 12.04 to 20.04 would work -- even if that method were supported (it's not). Many important components and default packages have changed. Again, nobody has tested it. If you feel like testing it, let us know what happened.

The only supported method is to back up your data and then clean-install Ubuntu 20.04. It's also likely to be the fastest and simplest method...even with the data backup/restore.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
user535733
  • 62,253