免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1343 | 回复: 0
打印 上一主题 下一主题

package-cleanup [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-05 22:06 |只看该作者 |倒序浏览
为什么这么说呢?
卸载deb包时候,可以连不要的依赖关系包一起删除,但是多如牛毛的rpm却不可以。
这个真的是rpm的痛!
yum仅仅能在线安装rpm,但是只能在安装的时候解决依赖关系,卸载的时候却不行。
不过,有个工具可以专门解决rpm依赖关系:package-cleanup
Options:
  -h, --help           show this help message and exit
  --problems           List dependency problems in the local RPM database
  --leaves             List leaf nodes in the local RPM database
  --all                When listing leaf nodes also list leaf nodes that are
                       not libraries
  --orphans            List installed packages which are not available from
                       currenly configured repositories.
  -q, --quiet          Print out nothing unecessary
  -y                   Agree to anything asked
  -d, --dupes          Scan for duplicates in your rpmdb
  --cleandupes         Scan for duplicates in your rpmdb and cleans out the
                       older versions
  --oldkernels         Remove old kernel and kernel-devel packages
  --count=KERNELCOUNT  Number of kernel packages to keep on the system
                       (default 2)
  --keepdevel          Do not remove kernel-devel packages when removing
                       kernels
  -c CONFFILE          config file location
Please specify either --problems, --leaves, --orphans or --oldkernels
例如,你不小心安装了gnome-games,然后马上把这个卸载。你会发现只卸载了gnome-games,那些“包庇”gnome-games的“同党”还留在你的硬盘里!
这时,你输入:package-cleanup --leaves
就会列出一系列的关系包,都是在rpm数据库里没有被依赖的依赖包。
把这些包统统remove,你的硬盘从此干净了。
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/62594/showart_490150.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP