Upgrade Ubuntu 18.04 to Ubuntu 19.10 Directly From Command Line

In a previous article, I explained how to upgrade Ubuntu 18.04 and Ubuntu 19.04 to Ubuntu 19.10. However, because Ubuntu 19.04 is stilled supported by the Canonical company, Ubuntu 18.04 users need to upgrade to 19.04 first and follow the same process to upgrade to 19.10. This tutorial will be showing you how to upgrade Ubuntu 18.04 directly to Ubuntu 19.10 from command line, bypassing Ubuntu 19.04.

Why Ubuntu 18.04 Needs to Upgrade to 19.04 First?

As explained in the previous article, if Ubuntu 18.04 users follow the standard upgrade procedure, they will be told to upgrade to 19.04 first.

upgrade ubuntu 18.04 to ubuntu 19.10 desktop

This is due to the fact that Ubuntu 19.04 is still being supported by Canonical and hasn’t reached end-of-life yet. After Ubuntu 19.04 reaches end-of-life in January 2020, Ubuntu 18.04 users can upgrade to 19.10 directly, following the standard upgrade procedure. If you don’t want to wait 3 months and don’t like upgrading twice, you can follow the instructions below to upgrade to 19.10 directly.

Note:  Before doing the upgrade, you can use the systemback program to create a bootable ISO image from your current OS. If the upgrade fails, you can easily restore your OS with the bootable ISO. Everything on your OS including software and files will be intact.  If you are using a laptop, please connect your power source.

Upgrade Ubuntu 18.04 to Ubuntu 19.10 Directly From Command Line

The method I’m going to show you is how the Ubuntu distribution upgrade manager works under the hood. The only difference is that we are going to change to upgrade path that Canonical gives us.

First, run the following command to upgrade existing software. (Please note that if a new kernel is installed while running the following command, you need to reboot system in order to continue the upgrade process.)

sudo apt update && sudo apt dist-upgrade

Then make sure you have update-manager-core package installed.

sudo apt install update-manager-core

Next, edit a configuration file using nano or your preferred command line text editor.

sudo nano /etc/update-manager/release-upgrades

At the bottom of this file, change the value of Prompt from lts to normal.

Prompt=normal

upgrade-to-ubuntu-19.10-from-command-line

To save a file in Nano text editor, press Ctrl+O, then press Enter to confirm. To exit, press Ctrl+X.

After that, we need to run the following command to change all instances of bionic to eoan in the source list file (/etc/apt/sources.list). Bionic is the code name for Ubuntu 18.04, whereas eoan is the code name for Ubuntu 19.10.

sudo sed -i 's/bionic/eoan/g' /etc/apt/sources.list

Then we need to disable third-party repositories (PPAs) with the command below.

sudo sed -i 's/^/#/' /etc/apt/sources.list.d/*.list

After you disable third-party repositories, run the following commands to update software sources and upgrade software to the latest version available in the Ubuntu 19.10 repository. This step is called minimal upgrade.

sudo apt update

sudo apt upgrade

If the apt-listchanges shows up during the upgrade, you can press the Q key to return to the main screen.

apt-listchanges

Once minimal upgrade is finished, run the following command to begin full upgrade.

sudo apt dist-upgrade

If you see this error:

Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Then run the following command to fix the error.

sudo apt update

And re-run

sudo apt dist-upgrade

Now you can remove obsolete/unneeded software packages from your Ubuntu system.

sudo apt autoremove

sudo apt clean

Finally, reboot the system.

sudo shutdown -r now

Once restarted, you can open up terminal window and check your Ubuntu version.

lsb_release  -a

You should see the following text.

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:        19.10
Codename:       eoan

How to Re-Enable Third-Party Repositories

Third-party repositories are defined in the .list files under /etc/apt/sources.list.d/ directory. First, re-enable third-party repositories with the following command, which will remove the # character in lines that begin with deb.

sudo sed -i '/deb/s/^#//g' /etc/apt/sources.list.d/*.list

Then change all instances of bionic to eoan.

sudo sed -i 's/bionic/eoan/g' /etc/apt/sources.list.d/*.list

Update package repository index.

sudo apt update

Some third-party repositories don’t have an entry for Ubuntu 19.10, so you will likely to see errors like:

E: The repository 'http://linux.dropbox.com/ubuntu eoan Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

You will need to edit these repository files one by one and change eoan back to bionic. For example, I edit the Dropbox repository file.

sudo nano /etc/apt/sources.list.d/dropbox.list

Change eoan back to bionic. Save and close the file.

Wrapping Up

Congrats! You have successfully upgraded Ubuntu 18.04 directly to Ubuntu 19.10 from the command line. As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks. Take care 🙂

Rate this tutorial
[Total: 14 Average: 5]

20 Responses to “Upgrade Ubuntu 18.04 to Ubuntu 19.10 Directly From Command Line

  • Nilesh Kumar Gupta
    4 years ago

    Thanks for the post, Was able to successfully upgrade from ubuntu 18.04 to ubuntu 19.10. Although my space in root ran out at one time, I had to run

    sudo apt clean

    to able to make space, otherwise all other steps happened peacefully.

  • Perhaps replace mention of ‘disco’ with ‘eoan’?

  • Nasher_87(ARG)
    4 years ago

    No is better ‘sudo do-release-upgrade -c’ directly?

    • Xiao Guoan (Admin)
      4 years ago

      The -c option makes the command check for new releases. It would not upgrade the system.

      linuxbabe@bionic:~$ do-release-upgrade -c
      Checking for a new Ubuntu release
      New release '19.04' available.
      Run 'do-release-upgrade' to upgrade to it.
  • Great tutorial, nice clear explanation of how to sort out the “no release file” error that’s been plaguing me.

  • dudeman
    4 years ago

    unlike most tutorials I find these days, this one worked if you follow the steps.

    nice job.

  • Michael Middleton
    4 years ago

    This tutorial worked but now my iRedMail 0.99 is borked. nginx is unhappy. SSL is confused… what should I do?

    nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
    2019/12/02 17:48:23 [warn] 25613#25613: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
    2019/12/02 17:48:23 [warn] 25613#25613: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/templates/ssl.tmpl:1
    2019/12/02 17:48:23 [emerg] 25613#25613: cannot load certificate "/etc/ssl/certs/iRedMail.crt": BIO_new_file() failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/ssl/certs/iRedMail.crt','r') error:2006D002:BIO routines:BIO_new_file:system lib)
    
  • FARRUKH NAJMI
    4 years ago

    This page is fantastically helpful. I had a device with no keyboard or mouse and only ssh access. This board helped me upgrade it from 18.04 (bionic) to 19.10 (eoan) via command line is ssh with no trouble at all.

    I then used the same instructions to upgrade from 19.10 to 20.04 (focal) via command line is ssh with no trouble at all.

    Thank you for a great and helpful resource.

  • Great tutorial. Worked perfectly!

  • Fernando Selles
    4 years ago

    Great tutorial, I will try it as soon as I finish a project I am working on.

  • Great JOB! This is one hell of a fantastic tutorial.
    I walked it through al steps and it works like a charm….

    I have one question:
    – When I want to Re-Enable the Thirt-Party Repositories I get the following message:

     udo sed -i '/deb/s/^#//g' /etc/apt/sources.list.d/*.list
    [sudo] password for adrian: 
    sed: can't read /etc/apt/sources.list.d/*.list: No such file or directory 

    what could be the problem, and I have to say it’s a clean instal

    • Xiao Guoan (Admin)
      4 years ago

      Maybe you don’t have any third party repository on your system, so there’s no files in /etc/apt/sources.list.d/ directory.

  • RandallG
    4 years ago

    Can this same procedure be used to get from 19.04 to 19.10?

    • Xiao Guoan (Admin)
      4 years ago

      Yes. Just replace bionic with disco in the commands and you should be able to upgrade.

      • RandallG
        4 years ago

        Sorry, I reread your response and it is correct as stated. Please disregards my question. 😉

  • RandallG
    4 years ago

    Do you mean ‘bionic’ to ‘eaon’? I’m currently on 19.04 disco dingo. I used your procedure to get from 18.04 to 19.04 and didn’t realize Ubuntu was already at 19.10.
    So I’d love to upgrade from my current version of 19.04 to 19.10. Doesn’t Ubuntu have a simpler path to upgrade?

  • in my case lots of packages where held back, so reinstalling dem with apt-get install worked for me ..

  • harlymdono
    3 years ago

    mine is ubuntu 19.04 but cannot upgrade to 19.10 after many try and errors… after i changed my resources ..its help… just dont give up

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here