+ -
当前位置:首页 → 问答吧 → [已解决]如何删除过时的distfiles

[已解决]如何删除过时的distfiles

时间:2009-01-08

来源:互联网

如题。

就像这个干的一样。
代码:
随着时间的推移, 您可能会在 distfiles 目录中积累下大量源代码文件。 您可以手工删除这些文件, 也可以使用下面的命令来删除所有 port 都不引用的文件:
# portsclean -D

作者: somebody   发布时间: 2009-01-08

eclean

作者: zhoukb   发布时间: 2009-01-08

wow.

非常感谢。

eclean-dist ing.

作者: somebody   发布时间: 2009-01-08

我想知道卸载软件后有些会留下一些残余文件,这些文件怎么清理?

作者: junlovemin   发布时间: 2009-01-09

emerge
代码:
 --depclean
 Cleans the system by removing packages that are not associated with explicitly
 merged packages. Depclean works by creating the full dependency tree from the sys‐
 tem and world sets, then comparing it to installed packages. Packages installed,
 but not part of the dependency tree, will be uninstalled by depclean. See
 --with-bdeps for behavior with respect to build time dependencies that are not
 strictly required. Packages that are part of the world set will always be kept.
 They can be manually added to this set with emerge --noreplace <atom>. As a safety
 measure, depclean will not remove any packages unless *all* required dependencies
 have been resolved. As a consequence, it is often necessary to run emerge --update
 --newuse --deep world prior to depclean.
 
 WARNING: Inexperienced users are advised to use --pretend with this option in
 order to see a preview of which packages will be uninstalled. Always study the
 list of packages to be cleaned for any obvious mistakes. Note that packages listed
 in package.provided (see portage(5)) may be removed by depclean, even if they are
 part of the world set. Also note that depclean may break link level dependencies.
 Thus, it is recommended to use a tool such as revdep-rebuild(1) in order to detect
 such breakage.

 Depclean serves as a dependency aware version of --unmerge. When given one or more
 atoms, it will unmerge matched packages that have no reverse dependencies. Use
 --depclean together with --verbose to show reverse dependencies.

作者: somebody   发布时间: 2009-01-09

我还以为跑到BSD版去了,呵呵
eclean-dist -d
emerge --depclean -av 后
最好紧接着要 revdep-rebuild ,要不然运气好的话就出乱子了

作者: axlrose   发布时间: 2009-01-09

distfile里的文件,我都是用rm直接删的,没发现有什么问题

作者: waterloo2005   发布时间: 2009-01-09

引用:
作者: axlrose
我还以为跑到BSD版去了,呵呵
eclean-dist -d
emerge --depclean -av 后
最好紧接着要 revdep-rebuild ,要不然运气好的话就出乱子了


是啊.revdep-rebuild很重要.上次就是没有记起来.重启的时候X挂了.

作者: somebody   发布时间: 2009-01-09

引用:
作者: waterloo2005
distfile里的文件,我都是用rm直接删的,没发现有什么问题
这方法确实省事,省时.

当然也没有问题.唯一有的问题只是多用点时间.多点带宽而已.


通常很多软件的ebuild更新的时候只是bug fix.这个时候只会去下载patch就好了.

你都rm 的源来的包.那当然还要去下载一下原来的源码包.

eclean做的只是删除那些过时的src包.比如一个大版本的升级.原来那个版本的src包就可以删除了.

不要跟我说你手动找到这个版本 rm的?

作者: somebody   发布时间: 2009-01-09

学到一个eclean,谢谢

作者: tlze   发布时间: 2009-01-09

学习了... 感谢

作者: kimux   发布时间: 2009-01-09

直接 全删 distfiles 下的压缩包文件是没啥问题的,不过只是下回remerge的时候要下一次了
我旁边的烂机子硬盘小, / 经常 100% 只好拿 distfiles 来开刀,因为eclean-dist -d 无法满足了,又不想 rm *,所以我常用以下两个方法
代码:
1 : cd /usr/portage/distfiles ; ls -lhSr 列出大包手工 rm 
2: 用 sys-fs/ncdu 这个小工具
有兴趣的可以试试,只不过磁盘空间够的话没必要了

代码:
[ distfiles] $ df -hT ./
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/sda7 ext3 5.3G 5.0G 26M 100% /

作者: axlrose   发布时间: 2009-01-09