When I attempt to add or remove any package, I get an error message from apt-get:

The following packages have unmet dependencies:
 ubuntu-desktop : Depends: nvidia-common but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Trying apt-get -f install:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 0 B/19.0 kB of archives.
After this operation, 155 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Preconfiguring packages ...
(Reading database ... 430130 files and directories currently installed.)
Unpacking nvidia-common (from .../nvidia-common_1%3a0.2.44.2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/nvidia-common_1%3a0.2.44.2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/nvidia/pre-install', which is also in package nvidia-installer-cleanup 20131102+1~bpo70+1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
Exit 100

Apparently two packages, nvidia-common and nvidia-installer-cleanup, share the same file, pre-install, which prevents nvidia-common from being installed, which prevents anything else from being installed. The truth is, I use a proprietary Radeon driver and do not even need NVidia.

P.S. The output of dpkg -l | grep glx:

ii  glx-alternative-fglrx                         0.4.1~bpo70+1                                   allows the selection of FGLRX as GLX provider
ii  glx-alternative-mesa                          0.4.1~bpo70+1                                   allows the selection of MESA as GLX provider
ii  glx-diversions                                0.4.1~bpo70+1                                   prepare for using accelerated GLX implementations from GPU vendors
ii  libgl1-mesa-glx                               8.0.4-0ubuntu0.7                                free implementation of the OpenGL API -- GLX runtime
ii  libgl1-mesa-glx:i386                          8.0.4-0ubuntu0.7                                free implementation of the OpenGL API -- GLX runtime
rc  libglitz-glx1                                 0.5.6-1build1                                   Glitz OpenGL library GLX backend
ii  libswt-glx-gtk-3-jni                          3.7.2-2                                         Standard Widget Toolkit for GTK+ GLX JNI library
ii  libxcb-glx0                                   1.8.1-1ubuntu0.2                                X C Binding, glx extension
ii  libxcb-glx0:i386                              1.8.1-1ubuntu0.2                                X C Binding, glx extension

The output of apt-cache rdepends nvidia-common:

Reverse Depends:

The output of apt-cache policy nvidia-common nvidia-installer-cleanup:

  Installed: (none)
  Candidate: 1:
  Version table:
     1: 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     1:0.2.44 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
  Installed: 20131102+1~bpo70+1
  Candidate: 20131102+1~bpo70+1
  Version table:
 *** 20131102+1~bpo70+1 0
        100 http://http.debian.net/debian/ wheezy-backports/contrib amd64 Packages
        100 /var/lib/dpkg/status
  • You could probably remove nvidia-installer-cleanup. Jun 24, 2014 at 20:59
  • glx-diversions depends on it, and tons of other packages depend on glx-diversions. I am not sure how critical are they?
    – DYZ
    Jun 24, 2014 at 21:06
  • possible duplicate of How do I resolve unmet dependencies? Jun 25, 2014 at 4:58
  • Unfortunatelly, not.
    – DYZ
    Jun 25, 2014 at 5:17
  • @DZinoviev: I would say it's not critical, and to proceed with caution. Jun 25, 2014 at 15:42

1 Answer 1


Why are you installing Debian packages?! Don't do that! Remove the Debian repository using:

sudo sed -i '/debian/d' /etc/apt/sources.list{,.d/*}

Then remove the nvidia-installer-cleanup package and make sure you don't have other Debian packages installed. Then run sudo apt-get install -f and hope it solves the issue.

Your nvidia-common package is trying to overwrite a file of nvidia-installer-cleanup as you have noticed. To get out of this situation you must give up installing nvidia-common or removing nvidia-installer-cleanup. I would use the later:

sudo dpkg --purge nvidia-installer-cleanup

and then run sudo apt-get install -f again. Since you also don't have NVidia cards I would just remove any and every nvidia package shown by dpkg -l | grep nvidia.

  • Braiam, glx-diversions depends on nvidia-installer-cleanup. I can remove either both or neither. And a lot of other glx packages depend on glx-diversions.
    – DYZ
    Jun 25, 2014 at 15:47
  • @DZinoviev include in your question the output of dpkg -l | grep glx
    – Braiam
    Jun 25, 2014 at 15:49
  • Added the output of dpkg -l | grep glx.
    – DYZ
    Jun 25, 2014 at 16:04

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.