Ubuntu – How to upgrade from 18.10 to 19.10, using the command line

upgrade

I'm trying to upgrade from 18.10 to 19.10, using sudo do-release-upgrade however I only get an error: An upgrade from 'cosmic' to 'eoan' is not supported with this tool.

I performed the steps to update my sources.list to point to old-release server, as suggested here: How to install software or upgrade from an old unsupported release?

This did not help. I get the same error.

Best Answer

It's still possible to do the upgrade, you just have to hack some files per this blog post in order to upgrade to 19.04 first. I was able to upgrade successfully following his method.

Quoting the blog:

  1. Run do-release-upgrade on the 18.10 system. This will give you an error about being unsupported. But behind the scenes, the tool will download some metadata files we want to modify.
  2. As root, go in to /var/lib/update-manager and copy the file meta-release to a new file meta-release2. This file was downloaded by do-release-upgrade from the Internet and tells the upgrader how to upgrade.
  3. Edit meta-release2. Remove all entries for eoan entirely. Modify the disco entry so it says Supported: 1
  4. Edit the file /usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py. Change this line of code self.metarelease_information = open(self.METARELEASE_FILE, "r") To read self.metarelease_information = open(self.METARELEASE_FILE + "2", "r") That will tell the upgrader to use your modified file instead of the original. (It will also avoid any redownloads overwriting your changes.)
  5. Run do-release-upgrade. It should now be doing an upgrade 18.10 → 19.04. Let that run as normal and reboot.
  6. Congratulations! You’re now running 19.04. Remove the /var/lib/update-manager/meta-release2 you made.
  7. Since 19.10 is supported, all you have to do to upgrade 19.04 → 19.10 is run do-release-upgrade again. No hacks necessary, you’re back on the main path.
Related Question