The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 17, 2019, 11:59:03 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: apt-get remove enema  (Read 1970 times)
dink
Expert
****
Offline Offline

Posts: 349


View Profile
« on: May 07, 2008, 11:57:31 AM »

For archives.

Works on debian etch and ubuntu 7.10

So, in a moment of carelessness you screwed up a config file.  Or a freak accident (where I was the freak) caused a package to be in a state of fubar.  You decide you need to remove said package and re install same.

You go to the command line and enter...apt-get remove *package*.  The system does it's thing and you say 'ok let's re install'.  apt-get install *package*.  Then the bad news.  The remove command didn't get all of it out of the system.  You can't install because part of the package is still there.  Now what?

First try dpkg -P *package*.  That will work most of the time.  However, there are cases where it doesn't work. 

Here is your last effort before a complete flush-and-reinstall of the server.  This is not recommended for a beginner as this command (rm -r) can cause real problems.  I'll use dovecot in this example 'cause it was my culprit.

First find what the apt-get remove didn't get:
Code:
# whereis dovecot
# dovecot: /usr/sbin/dovecot  /etc/dovecot  /usr/lib/dovecot  /usr/lib64/dovecot  /usr/include/dovecot  /usr/share/dovecot  /usr/share/man/man1/dovecot.1.gz
#

Now get rid of those items:
Code:
rm -r /usr/sbin/dovecot
rm -r /etc/dovecot
rm -r /usr/lib/dovecot
rm -r /usr/lib64/dovecot
rm -r /usr/include/dovecot
rm -r /usr/share/dovecot
rm -r /usr/share/man/man1/dovecot.1.gz


run this:
Code:
dpkg --force-all --purge dovecot-common
dpkg --force-all --purge dovecot-pop3d
dpkg --force-all --purge dovecot-imapd

That will have your system cleaned of all traces of dovecot.  Then it's a matter of apt-get install *package*

What a mess.  Gotta keep the freak from having accidents.   Grin
Logged

[quote Nutballs]
the universe has a giant fist, and its got enough whoop ass for everyone.
[/quote]
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!