The Problem:

While upgrading the Ubuntu OS version, I faced the following issue with the do-release-upgrade command. Even all the current packages were upgraded with apt upgrade.

sudo do-release-upgrade 

We faced a known issue that would not allow us to continue with the upgrade. You will see the following error message:

Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

Here are 2 solutions available to resolve this issue. It may be one solution not worked in some situations, try another solution.

Solution 1:

The first solution is to disable all third-party repositories in your system. Use the below given commands to disable all repositories:

cd /etc/apt/sources.list.d 
for i in *.list; do mv ${i} ${i}.disabled; done 

Then clean the Apt update state cache data:

apt clean
apt autoclean 

Now, again start the Ubuntu upgrade process.

sudo do-release-upgrade 

In case the above solution doesn’t now, follow the second solution.

Solution 2:

First of all clean all the Ubuntu upgrade state cache with the following commands.

apt clean 
apt autoclean 

Now, execute the following commands one by one.

sudo apt update 
sudo apt upgrade -y 
sudo apt dist-upgrade 

Finally, run the Ubuntu upgrade process again. Hopefully, this will resolve the issue

sudo do-release-upgrade 

If any of the above solutions resolved your issue, kindly share this tutorial. For any issues or other solutions please comment below.