FreeBSD中root ports和leaf ports的区别

portmaster把ports分成四类:

  1. Root ports (不依赖其他的ports,也不被依赖)
  2. Trunk ports (不依赖其他的ports,但是被其他的ports依赖)
  3. Branch ports (依赖于其他的ports,同时也被依赖)
  4. Leaf ports (依赖于其他的ports,但不被依赖,所以可以清除)
root@ywops:~ # portmaster -l
===>>> Root ports (No dependencies, not depended on)
===>>> pkg-1.14.4_1
===>>> portmaster-3.19_25
===>>> 2 root ports

===>>> Trunk ports (No dependencies, are depended on)
===>>> indexinfo-0.3.1
===>>> 1 trunk ports

===>>> Branch ports (Have dependencies, are depended on)
===>>> gettext-runtime-0.20.2
===>>> libtextstyle-0.20.2
===>>> 2 branch ports

===>>> Leaf ports (Have dependencies, not depended on)
===>>> gettext-tools-0.20.2
===>>> 1 leaf ports

===>>> 6 total installed ports

查看软件包的依赖的相关命令

pkg info -r pkgname
#-r, --required-by  Display the list of packages which require pkg-name

#portmaster列出所有安装的ports
portmaster -l	 
#-L  list all installed ports by category, and search for updates
#-l  list all installed ports by category

可以安装rmleaf工具清理leaf ports

cd /usr/ports/ports-mgmt/pkg-rmleaf/; make install clean ;rehash
或者
pkg install pkg-rmleaf
pkg-rmleaf
#pkg-rmleaf 会列出root ports和leaf ports

也可以使用以下两个命令

pkg delete pkgname
pkg autoremove #删除孤立软件包

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值