How to Fix ‘Please Install All Available Updates’ Error When Upgrading Ubuntu 18.04 to 20.04 LTS

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.

Sponsored
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()

Sponsored

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/*

sudo apt-get clean

sudo apt update && sudo apt upgrade

After cleaning the cache, try the upgrade command again:

sudo do-release-upgrade

Solution 5: Check for Third-Party Repositories

Third-party repositories can often cause upgrade issues:

Step 1: Open Software & Updates

Navigate to “Software & Updates” in your system settings.

Step 2: Disable Third-Party Repositories

In the “Other Software” tab, uncheck any third-party repositories.

Step 3: Update and Try Again

sudo apt update

sudo do-release-upgrade

Solution 6: Force the Upgrade (Use with Caution)

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

Verifying a Successful 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

Troubleshooting Post-Upgrade Issues

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

Preventing Future Upgrade Issues

To avoid similar problems in the future:

Regularly update your system:
sudo apt update && sudo apt upgrade

Be cautious with third-party repositories

  • Use PPAs only when necessary
  • Remove them before major upgrades

Keep your system clean:

sudo apt autoremove

sudo apt autoclean

Read: How to keep Ubuntu clean

FAQ: Common Questions About Ubuntu Upgrades

Why does Ubuntu say there are updates even after I’ve updated everything?

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.

Do I need to upgrade to 19.04 before going to 20.04?

No, you can upgrade directly from 18.04 LTS to 20.04 LTS. Ubuntu supports direct upgrades between LTS (Long Term Support) releases.

When will the automatic upgrade from 18.04 to 20.04 be available?

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.

Is it safe to use the -d flag when upgrading?

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.

What should I do if the upgrade fails midway?

If your upgrade fails partway through, you can try:

sudo dpkg –configure -a

sudo apt update

sudo apt upgrade

sudo do-release-upgrade

How long does the upgrade process typically take?

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.

Conclusion

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.


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply