Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I installed nginx (sudo apt-get install nginx) and then removed it with sudo apt-get remove nginx. I to need ensure that the application is uninstalled and cannot run. (I'm still able to run service nginx start without error in nginx\error.log).

I wonder why only 90kB was removed when I downloaded several megabytes? What am I doing wrong?

share|improve this question
1  
Try apt-get purge nginx. –  terdon Aug 29 '13 at 12:00
    
Check the description of the nginx package, which says: "This is a dependency package to install either nginx-full (by default) or nginx-light." –  derobert Aug 29 '13 at 15:22

1 Answer 1

up vote 5 down vote accepted

i wonder why only 90kB was removed when i downloaded many MB ?

This 90kb might only be the nginx executable. You can remove configuration files and other files left behind by the program with apt-get purge <program_name>.

The other MBs you might have downloaded were programs on which nginx might depend on to execute (so called dependencies). To remove dependencies with apt run apt-get autoremove

For a more canonical answer, consider this:

  • apt-get remove <package_name> will remove the binary files, but not data or configuration files.
  • apt-get purge <package_name> will remove everything that has installed, but not its dependencies. This might be useful in case you want to reinstall a piece of software, due to, for example, messed up configurations. You can also do the same thing if you run apt-get remove --purge <package_name>
  • apt-get autoremove removes software that was installed as a dependency by some other software, but are no longer needed.
share|improve this answer
    
okay thank you, i did all this command but configuration files are still in /etc/nginx and i can run nginx service and connect to website.. when i manually delete /etc/nginx and run 'apt-get install nginx' the configuration files are not created.. i really dont understand this .. apt-get purge nginx or apt-get remove --purge nginx also delete 90kB.. apt-get autoremove does nothing (0 to remove).. wtf :P and nginx is still running !! it was clean ubuntu installation by me so im sure i have no other webserver running –  Scott Aug 29 '13 at 12:42
    
maybe uninstallation was done but service process was still running, now im rebooting machine and will tell.. okay nginx is NOT uninstalled and still running (if i copy confs to /etc/nginx).. i really need to uninstall this :P –  Scott Aug 29 '13 at 12:44
    
@Scott Dit it work? –  NlightNFotis Aug 29 '13 at 12:53
    
okay apt-get purge nginx nginx-common nginx-full seems to really uninstalled the nginx service with all confs and binary –  Scott Aug 29 '13 at 12:53

Your Answer

 
discard

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.