LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: atfa

debian减肥,难?!

[复制链接]
发表于 2002-12-27 15:47:36 | 显示全部楼层
debfoster
发表于 2003-9-3 13:06:07 | 显示全部楼层

今天看到的

我系统装了xinetd,然后就想着要把inetd给删了,开始用dpkg -P netkit-inetd不行,有个依赖包的问题,后来用apt-get remove netkit-inetd,奇怪的是再执行dpkg -l |grep inetd,还是可以看到那个包,可是这时候执行dpkg -P netkit-inetd,就不会告诉我有什么依赖包的问题,我看了一下,除了/etc/inetd.conf文件没被删掉之外,别的好像都没了。
不知道还有没有人接着讨论这个问题。
发表于 2003-9-3 13:13:23 | 显示全部楼层
你的inetd被remove了,但没有purge,配置文件还在硬盘上
所以dpkg -l 还可以看到它
发表于 2003-9-3 15:18:13 | 显示全部楼层
最初由 carlos 发表
你的inetd被remove了,但没有purge,配置文件还在硬盘上
所以dpkg -l 还可以看到它



看来apt-get remove netkit-inetd不会移除配置文件,但是为什么用dpkg -l |grep inetd还能看到netkit-inetd这个包呢??照理应该被删除了才对的。
发表于 2003-9-3 15:45:02 | 显示全部楼层
要用apt-get --purge remove netkit-inetd才行
你用dpkg -l时,应该会发现,remove后,但未purge的包前面的标识,跟正常安装的包不同
以yudit为例
remove前
  1. # dpkg -l | grep yudit
  2. ii  yudit          2.7.5-1        Unicode text editor
复制代码

remove后,(未purge)
  1. # dpkg -l | grep yudit
  2. rc  yudit          2.7.5-1        Unicode text editor
复制代码

既然你还有配置文件留在系统中,当然debian就认为你没有完全删除这个软件啦
比起在Windows中删除软件好多了,不会出现因为留在系统中的垃圾过多,而导致操作系统运行变慢或死机的问题,我想兄弟们大概都经历过这种痛苦吧。
如果想将软件清除干净,可以执行
  1. # dpkg -P yudit
  2. (Reading database ... 155688 files and directories currently installed.)
  3. Removing yudit ...
  4. Purging configuration files for yudit ...
  5. #
复制代码
发表于 2003-9-3 17:54:28 | 显示全部楼层

先向版主表示敬意

呵呵,明白了,
但是dpkg总会提醒你依赖关系,当有别的包依赖你要移除的包的时候,将不能移除。
而使用apt-get 则会帮你“搞定”依赖关系。
看来还是apt-get 好用啊,这样我想楼主的问题就解决了吧。。。

谢谢版主。:thank
发表于 2003-9-3 20:18:25 | 显示全部楼层
debfoster 很适合做这件事
发表于 2003-9-3 22:02:05 | 显示全部楼层
有一个小程序叫deborphan,可以从你的Debian中找到没有用的库。如果要一次删除,可以用:

deborphan | xargs dpkg --purge

其它的程序只能你自己一点一点删了,用aptitude可以选,仔细选选能删掉很多东西的。
发表于 2003-9-8 11:36:47 | 显示全部楼层
其实aptitude我用着也不错
发表于 2004-10-25 12:37:49 | 显示全部楼层
jia@hua:~$ apt-cache show debfoster
Package: debfoster
Priority: optional
Section: admin
Installed-Size: 92
Maintainer: Ivo Timmermans <ivo@debian.org>
Architecture: i386
Version: 2.5-4
Depends: libc6 (>= 2.3.2.ds1-4)
Recommends: apt
Filename: pool/main/d/debfoster/debfoster_2.5-4_i386.deb
Size: 33398
MD5sum: 728b87acd366d256e296bdd1f4b6fad8
Description: Install only wanted Debian packages
debfoster is a wrapper program for apt and dpkg.  When first run, it
will ask you which of the installed packages you want to keep
installed.
.
After that, it maintains a list of packages that you want to have
installed on your system.  It uses this list to detect packages that
have been installed only because other packages depended on them.  If
one of these dependencies changes, debfoster will take notice, and
ask if you want to remove the old package.
.
This helps you to maintain a clean Debian install, without old
(mainly library) packages lying around that aren't used any more.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表