0

I tried to upgrade my Ubuntu from 21.10 to 22.04 with:

sudo do-release-upgrade -c
do-release-upgrade 

but I always get an error:

Hit http://sk.archive.ubuntu.com/ubuntu jammy InRelease                        
Hit http://sk.archive.ubuntu.com/ubuntu jammy-updates InRelease                
Hit https://deb.nodesource.com/node_14.x hirsute InRelease                     
Hit http://sk.archive.ubuntu.com/ubuntu jammy-backports InRelease              
Hit http://security.ubuntu.com/ubuntu jammy-security InRelease                 
Ign https://packagecloud.io/ookla/speedtest-cli/ubuntu impish InRelease        
Err https://packagecloud.io/ookla/speedtest-cli/ubuntu impish Release          
  404  Not Found [IP: 50.18.207.89 443]                                        
Fetched 0 B in 0s (0 B/s)                                                      
Hit http://sk.archive.ubuntu.com/ubuntu jammy InRelease                        
Hit http://sk.archive.ubuntu.com/ubuntu jammy-updates InRelease                
Hit http://sk.archive.ubuntu.com/ubuntu jammy-backports InRelease              
Hit https://deb.nodesource.com/node_14.x hirsute InRelease                     
Hit http://security.ubuntu.com/ubuntu jammy-security InRelease                 
Ign https://packagecloud.io/ookla/speedtest-cli/ubuntu impish InRelease        
Err https://packagecloud.io/ookla/speedtest-cli/ubuntu impish Release          
  404  Not Found [IP: 184.72.30.82 443]                                        
Fetched 0 B in 0s (0 B/s)                                                      
Hit http://sk.archive.ubuntu.com/ubuntu jammy InRelease                        
Hit http://sk.archive.ubuntu.com/ubuntu jammy-updates InRelease                
Hit http://sk.archive.ubuntu.com/ubuntu jammy-backports InRelease              
Hit https://deb.nodesource.com/node_14.x hirsute InRelease                     
Hit http://security.ubuntu.com/ubuntu jammy-security InRelease                 
Ign https://packagecloud.io/ookla/speedtest-cli/ubuntu impish InRelease        
Err https://packagecloud.io/ookla/speedtest-cli/ubuntu impish Release          
  404  Not Found [IP: 50.18.207.89 443]                                        
Fetched 0 B in 0s (0 B/s)

Error during update

A problem occurred during the update. This is usually some sort of network problem, please check your network connection and retry.

W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository 'https://packagecloud.io/ookla/speedtest-cli/ubuntu impish Release' does not have a Release file.

I tried to remove speedtest-cli, remove snap of speedtest, but nothing helped. Any idea what could I do?

2 Answers2

3

You should comment out the unofficial repositories before upgrading. This can normally be done in 2 ways:

  1. Commenting out the relevant line from /etc/apt/sources.list
  2. Renaming the relevant files inside the directory /etc/apt/sources.list.d

When you have performed the upgrade, check your old repos/files, and update them accordingly to the latest version. After that you can uncomment and/or rename the files back to activate the repositories.

For solution 1:

Find the lines containing https://deb.nodesource.com/node_14.x hirsute and https://packagecloud.io/ookla/speedtest-cli/ubuntu impish and put a # in front of the line.

For solution 2:

Find the files inside /etc/apt/sources.list.d that contains the above repositories. Rename those files, so they don't end with a .list extension (for instance, rename them to filename.list.old).

Artur Meinild
  • 26,018
2

First we'll find the file that's causing your errors...

cd /etc/apt

grep -i packagecloud.io sources.list

You may get no "hits" with the grep command if sources.list doesn't contain it. That's ok.


Then we look elsewhere...

cd sources.list.d

grep -i packagecloud.io *.list

This should provide you with the filename(s) that we're looking for.


Now we edit the found file(s) with...

sudo -H gedit found_filename.list

It should only contain one or two lines. Place a "#" (no quotes) at the front of each line, save the file.


Optional extra points:

grep -i deb.nodesource.com *.list

sudo -H gedit found_filename.list

Change hirsute to impish, save the file.


sudo apt update

Should run cleanly without the errors that you previously had.

If you wish to keep speedtest-cli, use this command, taken from here...

curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash

Then install/reinstall speedtest-cli or speedtest if you wish.

Then you can do your upgrade.

heynnema
  • 70,711