Eclean/zh-cn

是一个清理仓库源文件和二进制包的工具. 它是 包的一部分，并由 Portage-Tools 项目维护.

Emerge
安装 ：

使用
默认情况下，源文件存储在 目录下， 二进制包存储在  目录下；可以通过修改  中的 DISTDIR 和 PKGDIR 变量更改对应的存储位置. 如果不定期清理，这两个目录可能会悄然无声地变得非常巨大；这就是创建的原因.

调用
使用 来查看全部的命令简介、参数列表和使用介绍：

清理 源文件
通过  参数清理源文件存放目录：

或者使用更简短的命令：

清理二进制文件
使用下面的命令清理二进制包：

或者使用更简短的命令：

Options
By default, source files and binary packages corresponding to any ebuild in the current repository will not be deleted. This way, system administrators can easily downgrade a package or install a previously removed package, provided the package is still in the current repository tree.

As an example, suppose packages foo-1.0 and foo-1.1 are both in the repository. After updating from foo-1.0 to foo-1.1, run : source files for both versions will be kept, so if a problem occurs with foo-1.1 then the user can easily re-install foo-1.0 without re-downloading anything.

另一个可能的情况是安装之前删除的包. 假设系统安装了 foo 包（任一版本）. 在（不经意地）删除了这个包并运行了 之后，foo 的源文件依然被保留，可以重新安装而无需再次下载.

对二进制包同样的例子也一样适用.

To save more disk space, add the  option: every source file or binary package that does not correspond to some currently installed package (version does matter) will be deleted. Please notice that this way users will not be protected in case they need to downgrade a package or re-install a previously removed package.

As an alternative, use both the  and the   options: every source file or binary package that does not correspond to some currently installed package (version does not matter) will be deleted. This still will not protect in case a re-install of a previously removed package is needed, but it will protect the sources if the package needs to be downgraded later.

更多细节请参阅 eclean(1) man page：

另请参阅

 * Gentoolkit
 * Knowledge Base: Remove obsoleted distfiles
 * DISTDIR