9

When I was updating suddenly the process aborted with the message:

Could not calculate the upgrade 

An unresolvable problem occurred while calculating the upgrade. 

This was likely caused by: 
* Unofficial software packages not provided by Ubuntu 
Please use the tool 'ppa-purge' from the ppa-purge 
package to remove software from a Launchpad PPA and 
try the upgrade again. 

If none of this applies, then please report this bug using the 
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If 
you want to investigate this yourself the log files in 
'/var/log/dist-upgrade' will contain details about the upgrade. 
Specifically, look at 'main.log' and 'apt.log'. 


Restoring original system state

Aborting
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Please help me with update to Ubuntu 20.04 from 18.04.

3
  • 2
    The easiest way to guarantee an update is to remove all 3rd party software (ie. return to only using Ubuntu repository software), perform the upgrade, reboot then add back any 3rd party software required. If you filed the bug it mentioned, you can look there for packages creating the issue(s) then remove, or the logs as mentioned in your paste. A re-install (without format) is actually fastest in my experience.
    – guiverc
    May 12 '20 at 11:46
  • 1
    Did you "If you want to investigate this yourself the log files in '/var/log/dist-upgrade' will contain details about the upgrade. Specifically, look at 'main.log' and 'apt.log'." ?
    – heynnema
    May 12 '20 at 14:09
  • Check answer given here askubuntu.com/a/1306361/110089
    – Erick
    Jan 9 at 5:46
9

You have to remove third party repository. You can do it using one of two method:

Using the GUI (Software & Updates):

  1. Open Software & Updates app.
  2. Switch to Other Software tab.
  3. Uncheck all checkboxes (it will prompt for password first time).
  4. Retry upgrade to 20.04.

Using terminal:

  1. Issue this command on terminal:

    cd /etc/apt/sources.list.d
    
  2. Using an editor like nano or vi comment all uncommented line (put a # character at the beginning of line) in all files. (You need to use sudo) (You have to open all files one by one) (Uncommented line indicates those lines which don't start with a # character.)

  3. Retry upgrade to 20.04.
6
  • i tried "Using gui method" it didn't work May 12 '20 at 17:26
  • Please elaborate "Using terminal method" May 12 '20 at 17:26
  • @GreekSachdeva Do you know how to use terminal and text editors like nano? If yes, then add a # character at the first of every line of every files at /etc/apt/sources.list.d . May 12 '20 at 17:39
  • Nope i dont know May 12 '20 at 17:53
  • how can i update to 20.04 wihout losing data May 12 '20 at 17:54
7

Just

  • Go to Software & Updates
  • Go to Ubuntu software
  • In the Download from menu select main server

Then try to update Ubuntu. It worked very well for me.

2
  • I am using Ubuntu Budgie 18.04 and I don't have "Software & Updates"
    – Marecky
    Jan 5 at 23:01
  • This solution does not work for me. I have multiple programs installed from PPAs and this does nothing to upgrade 18.04 to 20.04
    – Marecky
    Jan 5 at 23:35
2

Late answer, but what I faced just mentioned here.

As the accepted answer steps didn't solve my problem completely, I checked the file

/var/log/dist-upgrade/main.log

It was mentioned there is an issue with python2.7. So I used the following command to uninstall it.

sudo apt purge -y python2.7-minimal

Then it worked fine. I was able to upgrade to Ubuntu 20.04.2 LTS.

3
  • There is no Ubuntu 20. there is 20.04 and 20.10
    – David
    Apr 1 at 13:18
  • I had this exact same problem - I could not upgrade to Ubuntu 20. Thanks @Tusar. +1 for the command to purge the old python reference! Apr 13 at 16:48
  • @David Updated Ubuntu version
    – Tusar
    Apr 20 at 7:32
1

I was having the same issue, and this answer helped me. In short you only have to:

  1. sudo apt install synaptic - if you don't already have it installed
  2. open synaptic, go to Status and remove all obsolete packages from the list
  3. upgrade ubuntu as usual

The only drawback is that you'll lose some packages you may use, but you can take a screenshot before the uninstall and get them back after the upgrade.

0

This answer worked with me.

Here the workaround i use to pass this problem. We need to use app called Synaptic to remove all packages that is considered as unofficial. Steps:

  1. install synaptic with “sudo apt-get install synaptic”
  2. open synaptic app and find the list of obsolete packages by clicking on the “Status” button and selecting “Installed (local or obsolete)”.
  3. select all of the obsolete packages and mark them for removal, then click on Apply button. (Note: Your important apps my listed as obsolete packages, so make sure to backup the app data if posible. You my also need to keep the list by using screenshot,so you can install them back later after upgrade).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.