One particularly frustrating error that many users face when trying to upgrade from Ubuntu 18.04 to 20.04 is the persistent “Please install all available updates for your release before upgrading” message.
Despite running the standard update commands, this error continues to appear, blocking the upgrade process.
In this comprehensive guide, I’ll walk you through multiple solutions based on real-world scenarios that have helped thousands of users complete their Ubuntu upgrade. Whether you’re managing a production server or your personal development machine, these methods will help you overcome this common upgrade obstacle.
Before diving into solutions, let’s understand why this error occurs. The Ubuntu release upgrade tool performs a safety check to ensure all packages are up-to-date before allowing a major version upgrade. This prevents potential conflicts or compatibility issues during the upgrade process.
However, sometimes packages can be “held back” for various reasons:
When these held packages exist, the upgrade tool refuses to proceed, even when apt update and apt upgrade report no issues.
Read: How to fix Ubuntu update errors
First, let’s ensure we’ve covered the basic update process correctly:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
If you’re still encountering the error after these commands, continue to the solutions below.
Run the following command to see if any packages are being held back:
sudo apt list –upgradable
You might see output like:
The following packages have been kept back:
colord gimagereader python-sane sane simple-scan
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Read: Fix Broken Packages in Ubuntu 24.04: Step-by-Step Guide to Package Repair & Removal
If you see packages listed as “kept back,” install them manually:
sudo apt install [package names]
For example:
sudo apt install colord gimagereader python-sane sane simple-scan
After manually installing the held back packages, try the upgrade command:
sudo do-release-upgrade
If the previous solution didn’t work, try this approach:
Run this command to list all packages that can be upgraded:
apt list –upgradable
Read: How to remove PPA in Ubuntu
Based on the output, you can either:
Install the upgradable packages:
sudo apt install [package name]
Or remove them if they’re not essential:
sudo apt remove –auto-remove [package name]
For example, several users reported success after removing wine packages:
sudo apt-get remove –auto-remove winehq-stable
For more technically inclined users, this solution helps identify exactly which packages are preventing the upgrade:
sudo cp /usr/bin/do-release-upgrade ~/
Read: How to create a Modern Python Development Environment
Open the file with your preferred editor:
sudo nano ~/do-release-upgrade
Look for this section:
for pkg in upgradable:
if ‘Phased-Update-Percentage’ in pkg.candidate.record:
# P-U-P does not exist if it is fully phased
continue
else:
install_count += 1
# one upgradeable package is enough to stop the dist-upgrade
break
Modify it to print package names and not break on the first issue:
for pkg in upgradable:
if ‘Phased-Update-Percentage’ in pkg.candidate.record:
# P-U-P does not exist if it is fully phased
continue
else:
install_count += 1
print(pkg) # Add this line
# break # Comment this line out
sudo ~/do-release-upgrade
This will show you exactly which packages are preventing the upgrade.
You can also use the Python interpreter to list upgradable packages:
import apt
cache = apt.Cache()
cache.open()
print([pkg for pkg in cache if pkg.is_upgradable])
Sometimes, corrupted package lists can cause upgrade issues:
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get clean
sudo apt update && sudo apt upgrade
After cleaning the cache, try the upgrade command again:
sudo do-release-upgrade
Third-party repositories can often cause upgrade issues:
Navigate to “Software & Updates” in your system settings.
In the “Other Software” tab, uncheck any third-party repositories.
sudo apt update
sudo do-release-upgrade
As a last resort, you can force the upgrade:
sudo do-release-upgrade -d -f DistUpgradeViewGtk3
-f DistUpgradeViewGtk3 is only for GUI-based upgrades. For server users, -f DistUpgradeViewText is the correct option.
Note: The -d flag is normally used for development releases. However, when upgrading from 18.04 to 20.04 before the first point release (20.04.1), this option might be necessary. Use with caution.
Real-World Example: Third-Party Repository Issues
In my experience managing a development team’s Ubuntu workstations, we encountered this error on multiple machines. After investigating, we discovered that MongoDB repositories were causing the issue. Here’s how we resolved it:
# First, we identified the held packages
sudo apt dist-upgrade
# Output showed:
# The following packages have been kept back:
# mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
# 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
# We manually installed these packages
sudo apt install mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
# Then we could run the upgrade successfully
sudo do-release-upgrade
After completing the upgrade, verify your Ubuntu version:
lsb_release -a
You should see the output indicating Ubuntu 20.04:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
If you encounter issues after upgrading:
Fix broken packages:
sudo apt –fix-broken install
Reconfigure packages:
sudo dpkg –configure -a
Update GRUB if you have boot issues:
sudo update-grub
To avoid similar problems in the future:
Regularly update your system:
sudo apt update && sudo apt upgrade
Be cautious with third-party repositories
Keep your system clean:
sudo apt autoremove
sudo apt autoclean
Read: How to keep Ubuntu clean
This usually occurs because some packages are being “held back” due to dependency issues, phased updates, or configuration problems. Use apt list –upgradable to see exactly which packages need updating.
No, you can upgrade directly from 18.04 LTS to 20.04 LTS. Ubuntu supports direct upgrades between LTS (Long Term Support) releases.
Automatic upgrades from 18.04 LTS to 20.04 LTS typically become available when the first point release (20.04.1) is published, which is usually a few months after the initial release.
The -d flag is meant for development releases. However, before the first point release, it’s sometimes necessary to use it for LTS upgrades. Use it with caution and ensure you have backups of important data.
If your upgrade fails partway through, you can try:
sudo dpkg –configure -a
sudo apt update
sudo apt upgrade
sudo do-release-upgrade
The upgrade time depends on your system specifications and internet connection speed, but typically takes 30 minutes to 2 hours. It involves downloading approximately 1-2GB of packages.
Upgrading Ubuntu can sometimes be challenging, especially when dealing with error messages that don’t clearly explain the underlying issues. By systematically addressing held packages, third-party repositories, and package management issues, you can successfully upgrade from Ubuntu 18.04 to 20.04 without having to resort to a clean installation.
The post How to Fix ‘Please Install All Available Updates’ Error When Upgrading Ubuntu 18.04 to 20.04 LTS appeared first on net2.
You’ve recently installed VMware Workstation on your Ubuntu system and encountered the frustrating “Could not…
Have you ever found yourself staring at a terminal full of 404 errors while trying…
In the world of containerization, time synchronization issues can create unexpected roadblocks when working with…
If you’ve recently upgraded to Ubuntu 23.04 or newer, you might have encountered a frustrating…
Canonical announces the General Availability of Ubuntu for the NVIDIA® Jetson Orin™ for edge AI…
Welcome to the Ubuntu Weekly Newsletter, Issue 883 for the week of March 9 –…