Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I tried to use this:

aptitude remove denyhosts

And it seemed successfully but after a reboot after I use:

ps aux | grep "denyhosts"

I see denyhosts is still loaded after startup.

So what am I supposed to do so that I can stop and destroy it once and for all? "aptitude remove something" isn't meant for uninstalling?

share|improve this question
add comment

2 Answers 2

up vote 13 down vote accepted

Will remove a package and all configuration files.

apt-get --purge remove package

If it is still giving you issues, try reinstalling then purging:

apt-get --reinstall install package
apt-get --purge remove package

You still might need to:

killall package

Reboot and if it started again run:

update-rc.d remove package

Story Time: Once for some unknown reason, when I purge removed ejabberd; it continued running. I trusted apt-get to kill it and remove it. It didn't. Needless to say, it eventually filled up my entire /var with a ramdisk log file. It continued until I killed all of the ejabberd processes and that quickly resolved the issue. So it taught me to always be sure that apt-get worked and killed all needed processes.

share|improve this answer
    
Thanks for the detailed answer. :) –  kavoir.com Sep 5 '09 at 12:14
    
Just so you know, aptitude is the preferred package manager in Debian. –  Michael Pobega Sep 5 '09 at 18:19
3  
apt-get, aptitude, and dpkg are all preferred package managers for Debian. It doesn't really matter much anymore as it has before. If Debian really only wanted a single package manager, they would symlink one of them to the others and teach the new one the same switches. –  David Rickman Sep 6 '09 at 0:39
add comment

In case you prefer aptitude:

# aptitude purge denyhosts

purge should also remove the init scripts, so the update-rc.d step is not really necessary.

Another thing that is possible that another package also provides a daemon called denyhosts. To search for all installed packages that contain files with denyhosts in them:

$ dpkg -S denyhosts
share|improve this answer
    
Spelling... –  liori Sep 5 '09 at 17:36
1  
Thanks, but IF you want to help, point out where somebody misspelled something, don't make them scan the entire post. If you just want to bitch about some non-native speaker making a mistake, have fun. –  0x89 Sep 5 '09 at 21:17
1  
i would guess that the spelling mistake he's referring to is "dpgk" instead of "dpkg" - it's a typing mistake i make frequently when i'm typing too fast. often enough that i've got used to typing "^gk^kg<ENTER>" to fix it. –  cas Sep 6 '09 at 1:22
    
Thanks Craig. I thought it was deamon <-> daemon - that's a mistake I frequently make. When I misstype dpkg my zsh kindly asks me if it is allowed to correct my mistake, but Serverfault currently misses that feature ;-) –  0x89 Sep 6 '09 at 9:55
    
Thanks! I found that apt-get couldn't really get rid of the package completely as I installed it with 'aptitude install' in the first place. apatitude purge denyhosts successfully removed the package completely! –  kavoir.com Sep 6 '09 at 14:12
show 1 more comment

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.