I am running sudo update-manager -d and start the upgrade process. I select upgrade option and when then manager enters Setting new software channels it throws an error.

Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade.

 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

If none of this applies, then please report this bug using the command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal.

I have disabled all unofficial and third party packages, I am not running a pre-release version since I am at 13.04 and I am trying to update to beta 2 which is not a pre-release. Before I fill a bug report, since its happening to both of my systems I would like to figure out if anyone else had same issues.

EDIT: added output for comment.

$ sudo dpkg -l | grep -w "rc"`
rc google-chrome-beta 31.0.1650.16-1 amd64 The web browser from Google
ii sysv-rc 2.88dsf-13.10ubuntu15 all System-V-like runlevel change mechanism

$ cat /etc/apt/sources.list

deb http://dk.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring main restricted

deb http://dk.archive.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring-updates main restricted

deb http://dk.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring universe
deb http://dk.archive.ubuntu.com/ubuntu/ raring-updates universe
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring-updates universe

deb http://dk.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring multiverse
deb http://dk.archive.ubuntu.com/ubuntu/ raring-updates multiverse
deb-src http://dk.archive.ubuntu.com/ubuntu/ raring-updates multiverse

deb http://security.ubuntu.com/ubuntu raring-security main restricted
deb-src http://security.ubuntu.com/ubuntu raring-security main restricted
deb http://security.ubuntu.com/ubuntu raring-security universe
deb-src http://security.ubuntu.com/ubuntu raring-security universe
deb http://security.ubuntu.com/ubuntu raring-security multiverse
deb-src http://security.ubuntu.com/ubuntu raring-security multiverse

deb http://extras.ubuntu.com/ubuntu raring main
deb-src http://extras.ubuntu.com/ubuntu raring main
deb http://dk.archive.ubuntu.com/ubuntu/ raring-proposed multiverse universe restricted main

$ lsb_release -c
Codename:   raring

$ sudo apt-get -y install aptitude && \
      sudo rename 's/\.list$/.list.disable/' /etc/apt/sources.list.d/*.list && \
      sudo aptitude update && \
      aptitude search '?narrow(?installed, !?archive(raring))'`

i   dropbox                       - cloud synchronization engine - CLI and Nautilus extension                      
i   google-chrome-stable          - The web browser from Google                                                    
i   google-talkplugin             - Google Talk Plugin                                                             
i   libdrm-intel1                 - Userspace interface to intel-specific kernel DRM services -- runtime           
i   libdrm-nouveau2               - Userspace interface to nouveau-specific kernel DRM services -- runtime         
i   libdrm-radeon1                - Userspace interface to radeon-specific kernel DRM services -- runtime          
i   libdrm2                       - Userspace interface to kernel DRM services -- runtime                          
i   libegl1-mesa                  - free implementation of the EGL API -- runtime                                  
i   libegl1-mesa-drivers          - free implementation of the EGL API -- hardware drivers                         
i   libgbm1                       - generic buffer management API -- runtime                                       
i   libgl1-mesa-dri               - free implementation of the OpenGL API -- DRI modules                           
i   libgl1-mesa-glx               - free implementation of the OpenGL API -- GLX runtime                           
i   libglapi-mesa                 - free implementation of the GL API -- shared library                            
i A libgles2-mesa                 - free implementation of the OpenGL|ES 2.x API -- runtime                        
i   libllvm3.3                    - Low-Level Virtual Machine (LLVM), runtime library                              
i   libopenvg1-mesa               - free implementation of the OpenVG API -- runtime                               
i   libxatracker1                 - X acceleration library -- runtime                                              
i   nodejs                        - Node.js event-based server-side javascript engine                              
id  nvidia-persistenced           - Load the NVIDIA kernel driver and create device files                          
id  nvidia-settings-331           - Tool for configuring the NVIDIA graphics driver                                
i   simplescreenrecorder          - A feature-rich screen recorder that supports X11 and OpenGL.                   
i A simplescreenrecorder-lib      - A feature-rich screen recorder that supports X11 and OpenGL.                   
i   sublime-text                  - Sublime Text is a sophisticated text editor for code, markup and prose         
i   vokoscreen                    - easy to use screencast creator                                                 
i   xserver-common                - common files used by various X servers                                         
i   xserver-xorg-core             - Xorg X server - core server                                                    
i   xserver-xorg-input-synaptics  - Synaptics TouchPad driver for X.Org server                                     
i   xserver-xorg-video-ati        - X.Org X server -- AMD/ATI display driver wrapper                               
i   xserver-xorg-video-cirrus     - X.Org X server -- Cirrus display driver                                        
i   xserver-xorg-video-intel      - X.Org X server -- Intel i8xx, i9xx display driver                              
i   xserver-xorg-video-mach64     - X.Org X server -- ATI Mach64 display driver                                    
i   xserver-xorg-video-nouveau    - X.Org X server -- Nouveau display driver                                       
i   xserver-xorg-video-r128       - X.Org X server -- ATI r128 display driver                                      
i   xserver-xorg-video-radeon     - X.Org X server -- AMD/ATI Radeon display driver                                
i   xserver-xorg-video-vmware     - X.Org X server -- VMware display driver        
  • It looks like its being caused by propriety video drivers.
    – topless
    Oct 18, 2013 at 12:29
  • Run this command and post the output in your answer after editing: sudo dpkg -l | grep -w "rc" Oct 18, 2013 at 19:17
  • @Braiam I have added the output you asked for, apt-get check is Building dependency tree and Reading state information... Done, and dpkg doesn't give an output.
    – topless
    Oct 28, 2013 at 10:08
  • Could you do the following: sudo apt-get -y install aptitude && sudo rename 's/\.list$/.list.disable/' /etc/apt/sources.list.d/*.list && sudo aptitude update && aptitude search '?narrow(?installed, !?archive(raring))' and paste the results? The first command will install aptitude, second will disable all PPA's, third will update your list and fourth will list all the package that don't comes from the repository.
    – Braiam
    Oct 28, 2013 at 10:35

10 Answers 10


What worked for me was removing any broken packages, as they were preventing the upgrade.

First find out which packages are broken:

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

Then remove them:

sudo apt-get remove <packages to remove>

Some might be reinstalled during the upgrade, others you may have to reinstall yourself.

  • 5
    It looks that I have a big list of xserver-xorg-video-* pacakges that are broken. I am not really sure but I feel like if I start removing them my system will break. Did you manage to remove them successfully? What kind of packages were causing you trouble?
    – topless
    Oct 18, 2013 at 12:28
  • 2
    I had to remove the same. The "good" versions came back when the upgrade completed. My upgrade was a success.
    – DaShaun
    Oct 18, 2013 at 19:18
  • 3
    That is exactly what I did 'sudo apt-get remove xserver-xorg-video-*'
    – DaShaun
    May 2, 2014 at 16:22
  • 2
    For me this was shoing about 25 broken packages, many of which looked like system packages. Jake's answer, on the other hand, showed a single misbehaving package. After uninstalling it, I could upgrade without problems.
    – Zoltán
    Jun 1, 2014 at 19:52
  • 19
    grep Broken grep Broken /var/log/dist-upgrade/apt.log gives me 700+ rows. Definitely can't remove them all. Aug 3, 2016 at 18:25

After your system fails to upgrade, check the file /var/log/dist-upgrade/main.log

I found the line:

2013-10-17 15:00:30,543 ERROR Dist-upgrade failed: 'The package 'xubuntu-desktop' is marked for removal but it is in the removal blacklist.'

I manually removed xubuntu-desktop. The upgrade then continued without issue.

  • 2
    Is there any way I keep this package and still update? I have postgresql-9.2 and I dont want to remove it. Oct 23, 2013 at 6:42
  • 1
    you could just re-install it after the upgrade is complete. Oct 25, 2013 at 16:52
  • After i had removed the only ERROR present i got a 2nd different ERROR when running do-release-upgrade again so had to manually remove this one as well. You might have to do this a number of times if you are unlucky enough. It is also possible that one of the other methods might have also highlighted these like hold or broken but I did not try them. Mar 8, 2016 at 10:09
  • Postgres seemed to be the thing that was holding me back. Thanks for pointing that out @AbdulsattarMohammed !
    – jocull
    Apr 13, 2016 at 16:18

Similar issue here. Last few lines in the "main.log" file indicated in the previous post were:

2013-10-17 23:44:38,233 DEBUG blacklist expr 'unity$' matches 'unity'
2013-10-17 23:44:38,233 DEBUG The package 'unity' is marked for removal but it's in the removal blacklist
2013-10-17 23:44:43,585 ERROR Dist-upgrade failed: 'The package 'unity' is marked for removal but it is in the removal blacklist.'
2013-10-17 23:44:43,586 DEBUG abort called
2013-10-17 23:44:43,592 DEBUG openCache()
2013-10-17 23:44:43,592 DEBUG failed to SystemUnLock() (E:Not locked) 
2013-10-17 23:44:46,786 DEBUG /openCache(), new cache size 41453
2013-10-17 23:44:46,786 DEBUG enabling apt cron job

Manually de-installed unity and upgrade now proceeds. Not quite sure what causes this issue in the first place and whether this is truly a good "solution" but I guess I'll find out after the update is completed?!?


If you are using the proprietary AMD/ATI fglrx video drivers, removing the fglrx packages and the xorg video driver will likely fix it:

sudo apt-get remove fglrx fglrx-amdcccle-updates
sudo apt-get remove xserver-xorg-video-ati:amd64

In my case, I had the fglrx drivers installed from the xorg-edgers PPA, and removing those packages cleared up my upgrade. Once the upgrade is complete, you can go through the process of setting up the proprietary drivers again.

  • This was what worked for me! May 10, 2014 at 9:41
  • fglrx-core was still left on my system after doing this. Others may also need to remove it. Jan 19, 2016 at 1:11

In my case, the problem was caused by a package that was in hold state. Putting it back to install state resolved the problem.

A possible way to put or remove a package in hold state is using dpkg. First, you get the current state of all packages, and put it into a file:

dpkg --get-selections > myselection

Then, you edit the file and replace install by hold, or vice-versa. Finally, you set the new selection:

sudo dpkg --set-selections < myselection
sudo apt-get update
sudo apt-get upgrade

Other ways are described in How to hold a package back from being upgraded?

  • 1
    why don't you tell us how you did it? This is not a complete answer, try describing your steps. How did you find the package and the actions you took.
    – topless
    Oct 22, 2013 at 8:43
  • 2
    How do you find out which packages are in hold state?
    – Dennis
    Nov 2, 2014 at 15:33
  • 1
    @Dennis with apt-mark showhold Sep 29, 2020 at 21:21

I had the same issue but was easily overcome by running the following in terminal:

sudo apt-get remove
sudo apt-get autoremove
  • 6
    sudo apt-get remove doesn't do anything.
    – guntbert
    Oct 19, 2013 at 19:35
  • Ahh, but it does list the packages that could be removed with auto remove. :) there is madness to my method.
    – seyDoggy
    Oct 20, 2013 at 11:11
  • 1
    So does sudo apt-get autoremove too.
    – guntbert
    Oct 20, 2013 at 15:46
  • 1
    +1 - I had to run sudo apt-get autoremove May 10, 2014 at 9:42
  • Thank you! Autoremove solved my issue. Turns out I had hundreds of broken/unusable remnants from past failed installations.
    – Faruk D.
    Jan 21, 2020 at 11:23

Apparently there is a easy way, just add /raring to each package name, like this:

sudo apt-get install dropbox/raring google-chrome-stable/raring google-talkplugin/raring libdrm-intel1/raring libdrm-nouveau2/raring libdrm-radeon1/raring libdrm2/raring libegl1-mesa/raring libegl1-mesa-drivers/raring libgbm1/raring libgl1-mesa-dri/raring libgl1-mesa-glx/raring libglapi-mesa/raring libllvm3.3/raring libopenvg1-mesa/raring libxatracker1/raring nodejsnvidia-persistencednvidia-settings-331/raring simplescreenrecorder/raring sublime-text/raring vokoscreen/raring xserver-common/raring xserver-xorg-core/raring xserver-xorg-input-synaptics/raring xserver-xorg-video-ati/raring xserver-xorg-video-cirrus/raring xserver-xorg-video-intel/raring xserver-xorg-video-mach64/raring xserver-xorg-video-nouveau/raring xserver-xorg-video-r128/raring xserver-xorg-video-radeon/raring xserver-xorg-video-vmware/raring

If it doesn't work, then try the method below.

That was expected, you have several packages that are not from the Ubuntu repositories that are critical for the installation. You should downgrade them, one by one (I haven't found a efficient way to do this) and then attempt the upgrade. I will make one as example:

$ apt-cache policy libdrm2
  Installed: 2.4.43-0ubuntu1.1
  Candidate: 2.4.43-0ubuntu1.1
  Version table:
 *** 2.4.43-0ubuntu1.1 0
        100 /var/lib/dpkg/status
     2.4.43-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ raring/main amd64 Packages

In your case, something like this should appear. You should take note of the version that has a url, in this case 2.4.43-0ubuntu1 that has http://archive.ubuntu.com/ubuntu/, save the pair for later in a text file using the format <package>=<version>.

If you see something like:

  Installed: 1.1.8
  Candidate: 1.1.8
  Version table:
 *** 1.1.8 0
        100 /var/lib/dpkg/status

notice that doesn't have a url, then that package can be removed:

sudo apt-get remove fluxgui

Then you finish your list should looks like:

libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1

(again and example, but you might be have an idea)

Once you have your list complete, type sudo apt-get -f install and paste your complete list, so it should looks like:

sudo apt-get -f install libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1 libdrm2=2.4.43-0ubuntu1

If you want to do it somewhat faster, you could use apt-cache policy libdrm2 libgbm1 with several package names.

  • well the first approach didn't resolve the issue, today I will have some time to go through the one by one steps you suggest. It would be nice to provide the command though for reverting the first changes since now it cannot actually apt-get update.
    – topless
    Oct 30, 2013 at 10:41
  • @topless if the first command fail, it means that nothing was done. If apt-get update doesn't work, it means another thing.
    – Braiam
    Oct 30, 2013 at 12:24
  • on apt-get update I get this kind of errors N: Ignoring file 'xorg-edgers-ppa-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
    – topless
    Oct 30, 2013 at 14:02
  • That's an info/warning, can be ignored, and is expected since we don't want PPA's in the way.
    – Braiam
    Oct 30, 2013 at 14:07
  • I will include "an eficient way" of removing packages "one-by-one" in my answer below. Its just a collection of all the tips i have got from all over the place.
    – nyxee
    Aug 16, 2017 at 12:31

I followed several of the answers above, attempting to get the upgrade to work, none of the ones not involving deleting Broken packages worked. I had 144 Broken packages, which seemed completely impractical. I deleted them one at a time, attempting the update after each one. After deleting 3 (perl-base,gnuplot, gnuplot-11), chosen essentially at random, the update succeeded. (14.04 to 16.04).


Regarding this answer, which works for me, a bit better variant exists: I've found automated script to remove Broken packages if there are too many. Solution found here.

remove.sh script:

apt update
apt upgrade
cat /var/log/dist-upgrade/apt.log | egrep -o "^Broken\s[a-z:\.0-9-]*" | sed 's/Broken //' | sed 's/:amd64//' > packages.txt
sort -u packages.txt > packages_sorted.txt
while read line; do
        apt remove -y $line 
done < packages_sorted.txt
apt autoremove -y && sudo apt autoclean -y
echo "Done"
apt install -f
dpkg --configure -a


sudo ./remove.sh

then do sudo do-release-upgrade as usual.

if necessary removed packages could be reinstalled from packages_sorted.txt file or in automated manner:

reinstall.sh script:

while read line; do
        apt install -y $line 
done < packages_sorted.txt
echo "Done"
  • P.S. However upgrade was buggy, so was forced to reinstall from USB. Mar 22 at 22:35
  • Unfortunately, for me, this wiped too much. "Broken" packages seemed to me to be safe to remove but unfortunately I went from working to no terminal, editor or right click for reinstall. If you try this, don't close your terminal window.
    – Squeeto Na
    Mar 27 at 15:09

I already answered this a while back if you had done a simple search here before posting the question.

sudo mv /etc/apt/sources.list.d/ /etc/apt/sources.list.d.bak; sudo sed -i 's/raring/saucy/g' /etc/apt/sources.list; sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade -y; sudo apt-get install -f; sudo aptitude upgrade -y; sudo aptitude dist-upgrade -y; sudo mv /etc/apt/sources.list.d.bak /etc/apt/sources.list.d; sudo sed -i 's/raring/saucy/g' /etc/apt/sources.list.d/*; sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade -y; sudo apt-get install ubuntu-desktop -y

Done, resolves all issues

  • 1
    Please, don't just throw this kind of answers. That procedure is potentially dangerous done without care.
    – Braiam
    Oct 28, 2013 at 10:21
  • Actually no it's not. It's not dangerous at all. The fact that you think it is dangerous means you don't know much about it. I've run it many times in the past and with many people. If you actually read the entire command you can see I have accounted for all possible issues. All the user needs to do is just watch the output of the command. Ubuntu 13.10 has a lot of issues with upgrading, but this fixes everything neatly and conveniently in one long command. I advise you to look into documentation of how 'do-release-upgrade' works, because it is precisely what this command does.
    – mmstick
    Oct 28, 2013 at 12:49
  • 1
    @mmstick You can elaborate a bit more on your long command and the issues it resolves, as long as the actual problem and how it tackles it. I see that you are calling multiple times apt-get upgrade and the rest of commands, so maybe again you can split it in line by line, and explain your process and why its working. I don't have the luxury to experiment with high risk, irreversible commands. Thanks for the effort though. We are all here to learn..
    – topless
    Oct 28, 2013 at 14:52
  • @mmstick, I am looking for your answer, you mentioned a while back and it looks its after my question, so you could have looked a bit better before replying in rude fashion to me and Braiam.
    – topless
    Oct 28, 2013 at 14:54
  • 2
    @mmstick don't be lazy edit your answer, to be complete for future reference. Its good that you contributed early but the problem I faced it for first time with 13.10 upgrade.
    – topless
    Oct 29, 2013 at 11:32

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