Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Uninstalling apps is a nightmare. For instance, I use 'sudo apt-get install nginx' and then when I go into Software Center, and uninstall it... it still keeps all the configs and some folders and I'm curious why.

I try using -rm -r on the folder ... it removes it all, success! Though, not for long. If I was to reinstall the application, it creates all the folders it needs ... but NONE of the files. So in order to reinstall an app, I need to reinstall the OS.

If I uninstall it, but not remove the excess files ... I can reinstall fine. It's just a hard wipe that doesn't reinstall fine.

The app could be nginx, it could even be PHP or many other things. What is happening and how can I fix this?

I did actually attempt purge, it didn't remove the configurations so I tried it again and it mentioned there were two apps that were related and if I was to install. I was to do 'autoremove'. It's not necessarily an instant reinstall. I perhaps may want to completely remove an app and then install it again in a few months later.

Just can't figure it out, but I guess I can have an attempt to read the manpage and see if it makes sense to my little brain, so right now I'm going to have to reformat in order to be able to install nginx again to test.

share|improve this question
    
@Jeanie: since you're trying to learn this, why don't you consider asking "How can I properly manage packages; I know how to get things installed (sample) but I have no clue how to uninstall them? I tried doing A or B but ran into problem X, Y and Z. Can someone point me in the right direction?" - it is more constructive than complaining that things don't work the way you expect them to –  sehe Sep 30 '11 at 15:31
add comment

migrated from stackoverflow.com Sep 30 '11 at 4:35

This question came from our site for professional and enthusiast programmers.

2 Answers

If you want to uninstall the application and the config files, you need to use sudo apt-get purge <app>. This behaviour is described in the man-page of apt-get. Read it with man apt-get. The command sudo apt-get remove … will keep the config file (for very good reasons!).

share|improve this answer
add comment

See the man pages for apt-get and synaptic.

Things often break when you manually delete files belonging to installed packages. Anyways, you can always

sudo apt-get install --reinstall some-package-name
sudo apt-get install -f
share|improve this answer
    
I have edited your answer to make it easier to read for others with a similar problem who find this answer when searching. I think your commentary would be better placed as a comment to the original question. If you disagree, please undo the edits. –  RedGrittyBrick Sep 30 '11 at 15:27
    
@RedGrittyBrick: Welcome edit. I had typed this as a comment but decided... it became unreadable - It explains the 'here nor there' half baked formatting. Thanks for the improvement –  sehe Sep 30 '11 at 15:29
add comment

Your Answer

 
discard

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