To upgrade (K)ubuntu from 19.04 to 20.04, perform the following steps:
# Attention: de.archive is for the german version. You may have to adapt it # First step: Update everything from the current version sudo sed -i 's/de.archive/old-releases/g' /etc/apt/sources.list sudo apt-get update -y sudo apt-get upgrade -y sudo apt-get dist-upgrade -y # Second step: Do the upgrade sudo sed -i 's/disco/focal/g' /etc/apt/sources.list sudo sed -i 's/old-releases/de.archive/g' /etc/apt/sources.list sudo apt-get update -y sudo apt-get upgrade -y sudo apt-get dist-upgrade -y
Now reboot and make sure you have the correct version:
Recently I wanted to install the brave browser to my Kubuntu system, but I observed that I was not able to install any packages due to 404 errors during apt-get install command:
Err http://archive.ubuntu.com main/restricted i386 Packages 404 Not Found [IP: 188.8.131.52 80] Ign http://ppa.launchpad.net trusty/main Translation-en_GB Err http://archive.ubuntu.com main/multiverse i386 Packages 404 Not Found [IP: 184.108.40.206 80] ...
After a while I found out, that my system was too old. I was running a Kubuntu 19.04 but the latest version was 20.04, so I decided to upgrade my system. To do so I had to update all packages first. As this was not possible via apt-get, the first step was to replace all occurrences in the /etc/apt/sources.list file of archive.ubuntu by old-releases.ubuntu. This foreces apt to fetch packages from the archived packages repositories rather than from the normal ones. You can achieve this by using sed command like so:
sudo sed -i 's/de.archive/old-releases/g' /etc/apt/sources.list
After this has been done, I was able to update via apt-get update and apt-get dist-upgrade to newer packages.
After that I tried to upgrade my Kubuntu. To do so I followed the steps described in this brilliant article. Unfortunately it was not possible for me to update a disco system to focal system directly, so I had to find another way. In order to update the system, I had to revert the previously done changes and edit the sources.list file again. This time I had to replace the old-releases occurrences by archive and in addition to that, I had to replace all occurrences of disco by focal.
sudo sed -i 's/disco/focal/g' /etc/apt/sources.list sudo sed -i 's/old-releases/de.archive/g' /etc/apt/sources.list
Finally I was able to do an apt-get update and an apt-get dist-upgrade. After a reboot I noticed that I now was running Kubuntu focal by running