When I try to upgrade from Ubuntu 19.10 (Eoan Ermine) to Ubuntu 20.04 (Focal Fossa) I get the following message:
Invalid package information
After updating your package information, the essential package 'ubuntu-minimal' could not be located. This may be because you have no official mirrors listed in your software sources, or because of excessive load on the mirror you are using. See /etc/apt/sources.list for the current list of configured software sources.
In the case of an overloaded mirror, you may want to try the upgrade again later.
Why does this happen since it should be a normal procedure? I want to change that animal soon. ;)
3 Answers
Introduction
Upgrading to a new version of Ubuntu is a common procedure for most users. However, sometimes things don’t go as planned, and you may encounter errors during the process. One of the most common errors that users face when upgrading to Ubuntu 20.04 is the “Invalid package information” error. This error occurs when the essential package ‘ubuntu-minimal’ cannot be located after updating the package information. In this blog post, we will discuss the reasons behind this error and how to resolve it.
Reasons behind the “Invalid package information” error
The “Invalid package information” error can occur due to several reasons. Here are a few possible reasons:
1. No official mirrors listed in software sources
One of the most common reasons behind the “Invalid package information” error is the absence of official mirrors in the software sources. When you upgrade to a new version of Ubuntu, the package manager needs to download the necessary packages from the Ubuntu repositories. If there are no official mirrors listed in the software sources, the package manager cannot locate the necessary packages, and the upgrade process fails.
2. Excessive load on the mirror
Another reason behind the “Invalid package information” error is excessive load on the mirror you are using. When a large number of users try to upgrade to a new version of Ubuntu simultaneously, it puts a lot of load on the mirrors. As a result, the mirrors may become unresponsive, and the package manager cannot download the necessary packages.
3. Corrupted package information
Sometimes, the package information stored on your system can become corrupted, leading to the “Invalid package information” error. This can happen due to a variety of reasons, such as a failed update or an incomplete installation.
Resolving the “Invalid package information” error
Now that we know the reasons behind the “Invalid package information” error let’s discuss how to resolve it.
1. Check software sources
The first thing you should do is check the software sources to ensure that you have official mirrors listed. To do this, open the terminal and type the following command:
sudo nano /etc/apt/sources.list
This will open the software sources file in the nano text editor. Check if any of the lines are commented out (i.e., have a “#” symbol at the beginning of the line). If any of the lines are commented out, remove the “#” symbol and save the file.
After making changes to the software sources file, run the following command to update the package information:
sudo apt update
This should update the package information and resolve the “Invalid package information” error.
2. Use a different mirror
If the “Invalid package information” error persists, you may want to try using a different mirror. To do this, open the terminal and type the following command:
sudo software-properties-gtk
This will open the Software & Updates application. Click on the “Download from” dropdown menu and select a different mirror. After selecting a different mirror, click on the “Close” button to save the changes.
Now run the following command to update the package information:
sudo apt update
This should update the package information and resolve the “Invalid package information” error.
3. Clean package cache
If the “Invalid package information” error still persists, you may want to try cleaning the package cache. To do this, open the terminal and type the following command:
sudo apt clean
This will remove all the cached package files from your system. After cleaning the package cache, run the following command to update the package information:
sudo apt update
This should update the package information and resolve the “Invalid package information” error.
4. Reinstall the ubuntu-minimal package
If none of the above methods work, you may want to try reinstalling the ubuntu-minimal package. To do this, open the terminal and type the following command:
sudo apt-get install --reinstall ubuntu-minimal
This will reinstall the ubuntu-minimal package and update the package information. After reinstalling the package, run the following command to update the package information:
sudo apt update
This should update the package information and resolve the “Invalid package information” error.
5. Upgrade to Ubuntu 20.04 using a fresh installation
If all else fails, you may want to consider upgrading to Ubuntu 20.04 using a fresh installation. This involves creating a bootable USB drive or DVD and installing Ubuntu 20.04 from scratch. While this method may take longer, it ensures a clean installation without any errors.
Conclusion
Upgrading to Ubuntu 20.04 should be a smooth process. However, sometimes, errors like the “Invalid package information” error can occur. In this blog post, we discussed the reasons behind this error and how to resolve it. By following the methods mentioned above, you should be able to upgrade to Ubuntu 20.04 without any issues.
Note that it could also be because your mirror needs not only the release you’re currently on but also the release you’re upgrading to. I run a local mirror that updates overnight, and my upgrades were failing because of this.
This is a common error when trying to upgrade to Ubuntu 4.20.
Something has changed the “apt sources.list” now you need to repair it.
- Make a backup copy of your apt sources.list:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
- Find the official sources for Ubuntu 19.10 at https://wiki.ubuntuusers.de/sources.list/#Eoan
- Open the sources.list file and add the following lines at the end:
sudo nano /etc/apt/sources.list
deb http://de.archive.ubuntu.com/ubuntu eoan main restricted universe multiverse deb http://de.archive.ubuntu.com/ubuntu eoan-updates main restricted universe multiverse deb http://de.archive.ubuntu.com/ubuntu eoan-security main restricted universe multiverse deb http://de.archive.ubuntu.com/ubuntu eoan-backports main restricted universe multiverse
- Now, update the sources and install all available updates for ubuntu 19.10. Then reboot your system.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo reboot
- Check the update-manager for the lts path:
sudo nano /etc/update-manager/release-upgrades
Prompt=lts
- Now run the upgrade:
sudo do-release-upgrade
Let me know if you have been successful. ;)