25

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.

6 Answers 6

28

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.

6
  • 4
    Thanks for pointing out WHERE the broken packages were. That was the key to my successful upgrade to 13.10.
    – DaShaun
    Oct 17, 2013 at 18:59
  • 1
    Yes! All was couse of xserver-xorg-*. (apt-get remove xserver-xorg-*)
    – Kerem
    Apr 10, 2014 at 23:55
  • 1
    Instead of "broken", a more specific keyword to use in your search of offending packages is "can't be satisfied".
    – ultrajohn
    Jan 11, 2015 at 13:44
  • 2
    I get a very long list of about 100 packages.
    – whoKnows
    Aug 8, 2015 at 19:16
  • 2
    This answer is incorrect. The apt.log file just shows apt working through the dependency list. Do not blindly remove the "Broken" packages. Look in /var/log/dist-upgrade/main.log to find the real error instead. Jan 29, 2018 at 11:56
23

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.

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

4
  • Thank you! Your answer is extremely educating! However, I fixed my issue before reading your reply. I had to enable the conflicting PPAs then purge them to get the job done.
    – Vagrant232
    Oct 19, 2012 at 8:12
  • 1
    what does sudo apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }') do?
    – whoKnows
    Aug 8, 2015 at 17:05
  • 1
    @whoKnows Sorry for the late answer. This will search-find and remove all the leftovers that have been marked for removal, but they have not been removed yet. That is what 'rc' means.
    – NickTux
    Sep 26, 2015 at 9:08
  • This didn't work for me, but the one below did
    – John Small
    Dec 26, 2018 at 20:57
8

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.

3

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)".

2
  • I upvote for this answer because it solved a problem. It was enough to uncheck „Community-maintened ... (universe)“. I had exactly the same problem as described on topic. I was upgrading from 14.04 to 16.04.1 with „Software Updater“.
    – Maug Lee
    Aug 2, 2016 at 14:21
  • This worked for me, the comments about purging packages didn't.
    – John Small
    Dec 26, 2018 at 20:58
3

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: https://askubuntu.com/a/541406/13868

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.

1
  • Thanks, very useful and still relevant info for 18.04 to 20.04 upgrade.
    – Mike T
    Feb 19, 2022 at 11:03
-4
sudo sed -i 's/raring/saucy/' /etc/apt/sources.list
sudo apt-get dist-upgrade

that worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .