Score:6

Can't upgrade Ubuntu 16.04 to newer release

hk flag

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.

E.Mohammed avatar
hk flag
I wanted to show it, but it makes my question to be considered as a spam
guiverc avatar
cn flag
Your paste only mentions `apt upgrade` which can leave packages behind (see `man` for guides; `apt full-upgrade` performs all updates), however as @Nmath has suggested in the answer you won't get all upgrades now without first enabling ESM (if the system is not fully-upgraded you risk having `do-release-upgrade` tell you to upgrade packages first). You didn't say if this is a desktop, if it is I'd likely perform an *upgrade via re-install* (ie. no format of partition(s)) to achieve the upgrade; it allows you to skip jump to 20.04 direct with almost all packages re-installed (no python2/Qt4..)
Nmath avatar
ng flag
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](https://askubuntu.com/editing-help#code) 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
E.Mohammed avatar
hk flag
@Nmath no it wasn't an image, I edited the question and added the output of the `apt update`
E.Mohammed avatar
hk flag
@guiverc I tried the `apt full-upgrade` and this is the output : `@Laptop:~$ sudo apt full-upgrade [sudo] password for mohammed: Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.`
E.Mohammed avatar
hk flag
@guiverc I forgot to mention that is just my personal laptop. I didn't understand the ESM, but I think there is no solution to do an upgrade, and I need to install the new release
Nmath avatar
ng flag
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: https://askubuntu.com/q/35629
N0rbert avatar
zw flag
Does this answer your question? [Why isn't \`apt upgrade\` getting a new software key signature for skype?](https://askubuntu.com/questions/1347851/why-isnt-apt-upgrade-getting-a-new-software-key-signature-for-skype)
guiverc avatar
cn flag
@Ruslan that won't help as ESM releases differ to fully-EOL releases. Ubuntu 16.04 ESM is still supported, even if 16.04 LTS is end of *standard* support... What you posted will apply come 2026-May (or thereabouts)
C.S.Cameron avatar
cn flag
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.
Score:10
ng flag

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

E.Mohammed avatar
hk flag
so I can't do an upgrade for my laptop and I need a full installation of the 20.04.
Nmath avatar
ng flag
It's the easiest and cleanest path forward
N0rbert avatar
zw flag
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` .
Nmath avatar
ng flag
@N0rbert - OP wants 20.04
N0rbert avatar
zw flag
Then run `sudo do-release-upgrade` twice. Not a problem at all.
Nmath avatar
ng flag
Agree to disagree
E.Mohammed avatar
hk flag
I signed up to ESM and did some updates, but the skype problem style persiste and don't know how to solve it, I was learning on this laptop and didn't have many knowledge like virtuel env ... that's why I have a messy list of packages. and I can't do the upgrade.
Nmath avatar
ng flag
@E.Mohammed - How many fruitless hours have you now spent trying to upgrade? This is why I have suggested from the very beginning to do a fresh install of 20.04.
E.Mohammed avatar
hk flag
@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.
Nmath avatar
ng flag
Can you borrow a drive or sign up for an online backup service? Backups are essential if you have data that you don't want to lose. This is especially true when performing risky operations like installing/upgrading operating systems and manipulating partitions, but data loss can happen at any time due to software errors, human error, hardware failure, natural disaster, and malicious hacking/theft/ransom, etc
Score:0
st flag

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+

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.