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.
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
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.
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 🙂
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
to able to make space, otherwise all other steps happened peacefully.
Perhaps replace mention of ‘disco’ with ‘eoan’?
Okay 🙂
No is better ‘sudo do-release-upgrade -c’ directly?
The -c option makes the command check for new releases. It would not upgrade the system.
Great tutorial, nice clear explanation of how to sort out the “no release file” error that’s been plaguing me.
unlike most tutorials I find these days, this one worked if you follow the steps.
nice job.
This tutorial worked but now my iRedMail 0.99 is borked. nginx is unhappy. SSL is confused… what should I do?
I think I have said that you should run iRedMail on Ubuntu LTS release.
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!
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:
what could be the problem, and I have to say it’s a clean instal
Maybe you don’t have any third party repository on your system, so there’s no files in /etc/apt/sources.list.d/ directory.
Can this same procedure be used to get from 19.04 to 19.10?
Yes. Just replace
bionic
withdisco
in the commands and you should be able to upgrade.Sorry, I reread your response and it is correct as stated. Please disregards my question. 😉
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 ..
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