How to fix the "Unable to calculate upgrade" issue when upgrading from 12.04 to 12.10?

All we need is an easy explanation of the problem, so here it is.

I’ve been trying to upgrade to 12.10 ever since it was released today but I keep meeting this error:

An unresolvable problem occurred while calculating the upgrade:
E:Unable to correct problems, you have held broken packages.
This can be caused by:  
 * Upgrading to a pre-release version of Ubuntu  
 * Running the current pre-release version of Ubuntu  
 * Unofficial software packages not provided by Ubuntu

I’ve tried updating all the currently installed software, removing all the extra PPAs, downgrading the files installed from xorg edgers’ ppa but I haven’t been able to solve the problem.

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

As stated here , removing PPA sources does not work every time.

You need to uninstall offending packages.
you can find them with:

grep Broken /var/log/dist-upgrade/apt.log

Mine was an xorg package. I removed it with the command:

sudo apt-get remove xserver-xorg-video-all

and then the upgrade could continue.

Method 2

For a “NonPainful” release upgrade.

  • Before proceed, check if the new release is available for upgrade. Open a terminal and give this command

    do-release-upgrade -c

If yes, proceed:

  • Remove all the external PPAs you’ve added.

    From Software-Center > Edit > Software Sources > Other Software. Do
    not only un-tick ,but delete them.

  • Then close all the graphical applications and open only a terminal.(Fullscreen is better)
    Give the bellow commands

    sudo apt-get update 
    sudo apt-get dist-upgrade
  • Then give the bellow commands to do a little housekeeping

    sudo apt-get --purge autoremove
    sudo apt-get autoclean
    sudo apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }')
  • Then you can procceed with the upgrade

    sudo do-release-upgrade

Do not navigate or open windows or programs during the upgrade.

Be patient until the upgrade finish.

Do not run (or rush) to upgrade from the day one. Upgrade from the day two or three(better).

Method 3

I fixed mine by removing ppa packages I had installed using ppa-purge

I knew I needed to do this by checking the logs in /var/log/dist-upgrade/
at the end of the apt.log file youll see what was confusing it. In mine it was a video driver, and i was running several upgrades, so I did:

sudo ppa-purge ppa:ubuntu-x-swat/x-updates
sudo ppa-purge ppa:unity-team/staging
sudo ppa-purge ppa:webapps/preview
sudo ppa-purge ppa:nilarimogard/webupd8
sudo ppa-purge ppa:scopes-packagers/ppa
sudo ppa-purge ppa:glasen/intel-driver

the last one – the glasen driver – seems to have done the trick for me. Upgrade is now proceeding as normal.

Method 4

I managed to solve the problem without removing any packages. On the settings for the update manager, I unchecked all of the Ubuntu Software options, leaving only the first box checked — “Canonical-supported free and open-source software (main)”.

Method 5

I had this error message on upgrading, albeit between different versions — I was doing 14.04 Trusty -> 16.04 Xenial — but I think this tip may be useful to other people who get the same error, since it took me ages to figure out, and this answer comes up prominently in Google.

It’s important to check if there is any error in /var/log/dist-upgrade/main.log – in my case, there was an error that saying that postgresql-9.3-postgis-2.1 was blacklisted from being removed, and the upgrade process was trying to remove it. Removing that package let me upgrade.

(n.b. /var/log/dist-upgrade/apt.log may mislead you by listing “Broken” packages which actually won’t block the upgrade.)

This is also pointed in this similar question and answer:

Incidentally, running sudo ubuntu-bug ubuntu-release-upgrader-core after the failed upgrade, can actually detect such problems and open the corresponding bug report in your web browser – that’s what helped me to find the problem.

Method 6

sudo sed -i 's/raring/saucy/' /etc/apt/sources.list
sudo apt-get dist-upgrade

that worked for me.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply