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.
Understanding the Problem
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:
- Third-party repository dependencies
- Package conflicts
- Phased updates not yet available for your system
- Repository configuration issues
- Broken package states
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
Preliminary Steps: The Standard Update Process
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.
Solution 1: Identify and Update Held Back Packages
Step 1: Check for Held Back Packages
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
Step 2: Install Held Back Packages Manually
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
Step 3: Try the Upgrade Again
After manually installing the held back packages, try the upgrade command:
sudo do-release-upgrade
Solution 2: Using the List Upgradable Command
If the previous solution didn’t work, try this approach:
Step 1: Identify Upgradable Packages
Run this command to list all packages that can be upgraded:
apt list –upgradable
Read: How to remove PPA in Ubuntu
Step 2: Install or Remove Problematic Packages
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
Solution 3: Advanced Python Debugging Method
For more technically inclined users, this solution helps identify exactly which packages are preventing the upgrade:
Step 1: Create a Modified Version of the Upgrade Script
sudo cp /usr/bin/do-release-upgrade ~/
Read: How to create a Modern Python Development Environment
Step 2: Edit the Script to Show Problematic Packages
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
Step 3: Run the Modified Script
sudo ~/do-release-upgrade
This will show you exactly which packages are preventing the upgrade.
Alternatively: Use the Python Console
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])
Solution 4: Clean APT Cache and Repository Lists
Sometimes, corrupted package lists can cause upgrade issues:
sudo rm -rf /var/lib/apt/lists var wpcf7 = {"apiSettings":{"root":"https:\/\/net2.com\/wp-json\/contact-form-7\/v1","namespace":"contact-form-7\/v1"},"cached":"1"};