UNIX/ubuntu

apt-get VS dpkg

99iberty 2012. 8. 21. 14:41

 

 

citadel 이라는 패키지가 syslog에서 계속 지저분한 로그를 남기길래 이리저리 보다가...

/var/log/apt/history.log 를 살펴보니

nmh 패키지를 설치하며 같이 설치된 패키지임을 알았다.

 

Start-Date: 2012-08-20  15:07:40
Commandline: apt-get install nmh
Install: libical0:amd64 (0.44-3, automatic), db4.6-util:amd64 (4.6.21-17, automatic), libcitadel2:amd64 (7.84-1, automatic), citadel-mta:amd64 (7.84-3, automatic), shared-mime-info:amd64 (0.90-1ubuntu3, automatic), libcurl3:amd64 (7.21.3-1ubuntu1.5, automatic), nmh:amd64 (1.3-1), citadel-server:amd64 (7.84-3, automatic), libdb4.6:amd64 (4.6.21-17, automatic), libdb4.7:amd64 (4.7.25-10ubuntu1, automatic), libsieve2-1:amd64 (2.2.6-1, automatic)
End-Date: 2012-08-20  15:07:52

 

apt-get autoremove nmh 해도... citadel 이 안 지워졌었나 보다.

 

그래서 apt-get autoclean

apt-get autoremove citadel-mta

apt-get autoremove citadel-server

apt-get autoremove libcitadel2

 

를 한 후 설치된 패키지 확인 명령인 dpkg -l | grep citadel

하니 mta는 없어져 있는데 server랑 2는 아직도 그대로인 것이당.

 

왜 apt-get remove를 해도 dpkg에 리스트가 없데이트 되지 않는 것인가?

둘은 각자 상호작용하지 않고 따로 노는놈이었던말인가?!

그래서 이것저것 살펴보다가 이 명령어를 치니 dpkg에서도 사라졌다...

http://www.linuxquestions.org/questions/debian-26/how-do-i-get-apt-get-to-completely-uninstall-a-package-237772/

 

root@cloud-plb:/var/log/apt# dpkg --purge citadel-server
(Reading database ... 53534 files and directories currently installed.)
Removing citadel-server ...
Purging configuration files for citadel-server ...
/var/lib/citadel/data not removed, as it may contain your personal data.
dpkg: warning: while removing citadel-server, directory '/var/spool/citadel/network' not empty so not removed.
dpkg: warning: while removing citadel-server, directory '/var/spool/citadel' not empty so not removed.
dpkg: warning: while removing citadel-server, directory '/var/lib/citadel/data' not empty so not removed.
dpkg: warning: while removing citadel-server, directory '/var/lib/citadel' not empty so not removed.
Processing triggers for ureadahead ...
root@cloud-plb:/var/log/apt# dpkg -l | grep citadel
rc  libcitadel2                     7.84-1                             Citadel toolbox
root@cloud-plb:/var/log/apt# dpkg --purge libcitadel2
(Reading database ... 53511 files and directories currently installed.)
Removing libcitadel2 ...
Purging configuration files for libcitadel2 ...

 

 

아래 사이트를 보면 또 상세한 내용이 있을 것이다.

http://www.nobleknights.com/index.php/apt-and-dpkg-quick-reference-sheet/