7

I have a HP EliteBook 2540p. I want to upgrade my Ubuntu 16.04 to a newer release. I found that I need to upgrade to 18.04 before going to 20.04.

I tried the recommended procedure by updating the system and upgrading software and packages using this command:

sudo apt update && sudo apt upgrade
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease                                                    
Hit:2 http://ppa.launchpad.net/canonical-chromium-builds/stage/ubuntu xenial InRelease                        
Hit:3 http://repo.mysql.com/apt/ubuntu xenial InRelease                                                       
Hit:4 http://packages.microsoft.com/repos/code stable InRelease                                               
Ign:5 http://repo.vivaldi.com/stable/deb stable InRelease                                                     
Hit:6 http://dl.google.com/linux/chrome/deb stable InRelease                                                  
Hit:7 http://ma.archive.ubuntu.com/ubuntu xenial InRelease                                                    
Get:8 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]                                    
Hit:9 http://ppa.launchpad.net/clipgrab-team/ppa/ubuntu xenial InRelease                                      
Hit:10 http://repo.vivaldi.com/stable/deb stable Release                                                      
Get:11 http://ma.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]                                  
Get:12 https://download.docker.com/linux/ubuntu xenial InRelease [66.2 kB]                                    
Hit:13 http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu xenial InRelease                             
Hit:14 https://deb.opera.com/opera-stable stable InRelease                                                    
Hit:15 https://brave-browser-apt-release.s3.brave.com xenial InRelease                                        
Hit:16 https://brave-browser-apt-dev.s3.brave.com xenial InRelease                                            
Hit:17 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease                                  
Hit:18 https://brave-browser-apt-beta.s3.brave.com xenial InRelease                                           
Get:19 https://repo.skype.com/deb stable InRelease [4,502 B]                                                  
Hit:20 https://brave-browser-apt-nightly.s3.brave.com xenial InRelease                                        
Hit:21 http://ppa.launchpad.net/noobslab/indicators/ubuntu xenial InRelease
Hit:22 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security InRelease                         
Get:23 http://ma.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]                     
Hit:24 https://deb.nodesource.com/node_5.x xenial InRelease                          
Hit:25 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease                   
Hit:26 https://esm.ubuntu.com/infra/ubuntu xenial-infra-updates InRelease            
Hit:27 http://ppa.launchpad.net/remmina-ppa-team/remmina-next/ubuntu xenial InRelease                         
Hit:29 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial InRelease
Hit:30 https://packagecloud.io/AtomEditor/atom/any any InRelease
Hit:31 https://packagecloud.io/shiftkey/desktop/any any InRelease
Err:19 https://repo.skype.com/deb stable InRelease
  The following signatures were invalid: KEYEXPIRED 1624268195  KEYEXPIRED 1624268195  KEYEXPIRED 1624268195
Hit:32 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done 
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: GPG error: https://repo.skype.com/deb stable InRelease: The following signatures were invalid: KEYEXPIRED 1624268195  KEYEXPIRED 1624268195  KEYEXPIRED 1624268195
E: The repository 'https://repo.skype.com/deb stable InRelease' is not signed.
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.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1

I think I can't get all the updates and upgrades that I need, and I don't know what is the problem.

After that I tried this command to check the available release:

$ sudo do-release-upgrade -c
Checking for a new Ubuntu release
New release '18.04.6 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

It looks like it's working, but when I try the command to upgrade, it doesn't work:

$ sudo do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

I don't know what the problem is.

3 Answers3

11

In short, you waited too long to do this easily and effectively.

16.04 is already past standard support, which means that there are no longer updates unless you are on Extended Security Maintenance (ESM). You need to perform updates before you can upgrade to the next release, which you can't do without using ESM. Hence the problem.

You could sign up for ESM, perform your system maintenance, and theoretically should be able to upgrade to 18.04 without incident.

But since you want to be on 20.04, it doesn't really make any sense to release upgrade. You can't easily skip over releases when upgrading and there's always a potential for an upgrade to be unsuccessful, depending on your hardware and whatever is already installed on your system, especially if you have any software that didn't come from Ubuntu repos. Release upgrades also take a long time to complete.

It's probably better that you cleanly install 20.04 at this point. Remember that LTS releases come with 5 years of standard support and if you don't want to be in this predicament in the future, make sure you upgrade in a timely manner. You have three whole years to upgrade after a new LTS to the next LTS before it becomes unsupported.

You can also sign up for the ubuntu-announce mailing list to get emails about new releases and EOL announcements:

https://lists.ubuntu.com/mailman/listinfo/ubuntu-announce

Campa
  • 1,022
Nmath
  • 12,664
1

If after

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove

still

Please install all available updates for your release before upgrading.

do

sudo apt list --upgradable

sudo apt remove <listed packages of command above>

e.g.

sudo apt remove chrome-remote-desktop google-chrome-stable

If still no try:

sudo ua enable esm-infra

If the output is

To use 'esm-infra' you need an Ubuntu Pro subscription Personal and community subscriptions are available at no charge See https://ubuntu.com/pro

then register to pro in https://ubuntu.com/pro/dashboard then from there

sudo pro attach <pro token>

Now you are able to

sudo apt dist-upgrade

with new libs. Afterwards

sudo do-release-upgrade

will do the thing.

MosQuan
  • 43
0

I struggled attempting to update from 14.04 and was about to give up when I read the comment by @N0rbert which inspired me to try again.

the steps that eventually worked for me were (likely optimizable)

  • sudo apt update && sudo apt upgrade
  • sudo apt dist-upgrade
  • sudo reboot now
  • dpkg --get-selections | awk '$2 == "deinstall" {print $1}' | xargs sudo apt-get purge -y
  • sudo apt update && sudo apt upgrade
  • sudo apt install update-manager-core
  • sudo do-release-upgrade

I am now running 16.04.07 LTS successfully. This is great news because all the important server customizations I wanted to keep are intact and running!

** EDIT **

I realize I started from 14.04 which is even more decrepit but my strategy also applies to 16.04+

Jacksonkr
  • 341