How Do You Troubleshoot Nginx Not Being Removed from Ubuntu Linux Like It Should?

Problem scenario
You want to remove Nginx from an Ubuntu server.  You run this: sudo apt-get remove nginx

But you receive this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 nginx-dbg : Depends: nginx (= 1.12.1-1~xenial)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

What do you do to remove Nginx?

Remove nginx-dbg first.  Run this command:  sudo apt-get remove nginx-dbg
Then remove nginx with a command like this:  sudo apt-get remove nginx

Leave a comment

Your email address will not be published. Required fields are marked *