Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
root@ubuntus:~# apt-get remove nginx-light
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package nginx-light is not installed, so not removed
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  nginx-full: Depends: nginx-common (= 1.0.5-1ppa2~lucid) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

How to solve it?


root@tftc:~# 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 41 not upgraded.
2 not fully installed or removed.
Need to get 0B/60.6kB of archives.
After this operation, 246kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 62634 files and directories currently installed.)
Unpacking nginx-common (from .../nginx-common_1.0.5-1ppa2~lucid_all.deb) ...
dpkg: error processing /var/cache/apt/archives/nginx-common_1.0.5-1ppa2~lucid_all.deb (--unpack):
 trying to overwrite '/etc/ufw/applications.d/nginx', which is also in package nginx 0:1.0.5-1ppa2~lucid
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
Read line 5. It is not installed. – mailq Aug 25 '11 at 8:48

You broke your system by messing up your package repository. So you have to solve it by issuing in order:

apt-get update
apt-get upgrade
apt-get install nginx-common
apt-get remove nginx-full

at each step read the messages carefully and follow the given instructions.

Edit: It is still true what I said. You really messed your setup. It's never a good idea to force installs. You tried to install a package not appropriate for your system and then forced another install of the same with another version number. And I don't know which other packages you forced to install/update/remove. (2 not fully installed or removed. is a bad thing.) So I would try

apt-get remove nginx-common nginx-full
apt-get purge nginx-common nginx-full
apt-get -f install

And next time think twice before installing packages meant for other Ubuntu/Debian versions.

share|improve this answer
Please, read the updated entry of post. There is something with installing nginx-common... – Kir Aug 25 '11 at 8:59

I just "reproduced" the problem:

  • install nginx 0.7.x which is standard in Ubuntu 10.04
  • add nginx's PPA
  • run apt-get update and apt-get upgrade
  • the upgrade fails, trying to remove/purge nginx fails too

The fix:

  • remove the nginx PPA (I commented out the line in /etc/apt/sources.list.d/...)
  • apt-get purge nginx nginx-full nginx-common - this now succeeds
  • add the PPA again (uncomment the line)
  • apt-get update, apt-get install nginx
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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