6

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.

10
  • I wanted to show it, but it makes my question to be considered as a spam
    – E.Mohammed
    Sep 24, 2021 at 21:41
  • 1
    Are you trying to upload a picture of your terminal? (Please Don't) - You can edit your question to copy-paste. Make sure that you use code fences to retain line breaks and formatting so that we can parse the info. That being said, I think it's a time-consuming endeavor to salvage an outdated installation and it's probably best to install 20.04 cleanly. See below
    – Nmath
    Sep 24, 2021 at 22:00
  • 3
    You have a gargantuan list of sources and a lot of duplicates. You would have to remove these duplicates before you do anything else. Even more than before, with the state of your system I strongly suggest that a clean install is the best option to get to 20.04. In regards to your sources and all of those PPAs: askubuntu.com/q/35629
    – Nmath
    Sep 25, 2021 at 0:08
  • 2
    Does this answer your question? Why isn't `apt upgrade` getting a new software key signature for skype?
    – N0rbert
    Sep 25, 2021 at 6:21
  • 1
    A lot of the hassle when doing a full upgrade is rebuilding your home directory. you may want to backup your home and restore it to the new install. Reinstalling programs is not such a big problem usually. Sep 26, 2021 at 1:20

3 Answers 3

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

9
  • 1
    It's the easiest and cleanest path forward
    – Nmath
    Sep 25, 2021 at 0:09
  • 2
    Absolutely wrong position. Fixing single E: with skype repository is easier. OP should fix this single repository problem, then run sudo apt-get update to get correct package lists and then install all the upgrades for 16.04 by sudo apt-get dist-upgrade, then reboot and run sudo do-release-upgrade .
    – N0rbert
    Sep 25, 2021 at 6:23
  • 1
    @N0rbert - OP wants 20.04
    – Nmath
    Sep 25, 2021 at 7:00
  • 2
    Then run sudo do-release-upgrade twice. Not a problem at all.
    – N0rbert
    Sep 25, 2021 at 7:00
  • 1
    @Nmath, I appreciate your recommandation and agree with it. to do a fresh installation I need to save all my data in an external hard drive which I don't have (many giga of files and data) that's why I'm looking for a way to keep my data and upgrade to the last release. I'm not stuck with a problem or something I'm working trying to do web-development.
    – E.Mohammed
    Sep 26, 2021 at 19:35
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+

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .