在MacPorts中,如何识别和卸载未使用的库端口?

发布于 2024-11-28 11:37:39 字数 124 浏览 0 评论 0原文

macports 中的许多端口作为其他(应用程序)端口的库依赖项安装,但卸载这些应用程序端口并不会卸载相应的库依赖项。随着时间的推移,许多这样的图书馆端口变成了孤儿,浪费了空间。所以我想知道是否有办法找到它们。

谢谢。

Lots of ports in macports are installed as library dependencies of the other (application) ports, but uninstall those application ports doesn't uninstall corresponding library dependencies. As time goes by, lots of such library ports become orphon and is just a waste of space. So I wonder if there is a way to find them out.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

旧人哭 2024-12-05 11:37:40

要删除非活动端口,您可以运行

sudo port uninstall inactive

要从 2.4 及更高版本中删除,您可以运行

sudo port reclaim

<块引用>

回收操作尝试通过卸载不活动的端口并删除安装过程中下载的不必要的文件来回收空间。

To remove inactive port you can run

sudo port uninstall inactive

To remove from version 2.4 and upper you can run

sudo port reclaim

The reclaim action attempts to reclaim space by uninstalling inactive ports, and removing unnecessary files that were downloaded during the installation process.

绝不放开 2024-12-05 11:37:40

您需要一个名为 port_cutleaves 的包/脚本。
我认为它可以直接从 macports 或 fink 获得。
无论哪种方式,你的问题都是孤立的依赖项,这应该删除它们,抱歉,我没有使用详细信息,因为我没有安装 macports。

更新:此链接可能对您有帮助,它是一个备忘单。
http://www.jbmurphy.com/2011/ 02/17/my-mac-ports-cheat-sheet/

There is a package/script you need called port_cutleaves.
I think it's available directly from macports or fink.
Either way your problem is orphaned dependencies, and this should remove them, sorry I don't have details of usage as I'm away from my macports install.

Update: This link might help you, it's a cheat sheet.
http://www.jbmurphy.com/2011/02/17/my-mac-ports-cheat-sheet/

数理化全能战士 2024-12-05 11:37:40

安装新版本的 ports 后,旧版本将更改为非活动状态,但仍保留在磁盘上。要查看这些端口:

port list inactive

要删除所有不活动端口:

[[ -z "$(port -q list inactive)" ]] || sudo port uninstall inactive

这不会删除任何端口的活动版本,包括仅在构建特定端口期间需要的端口。正如 @Mitchell Currie 提到的,如果您想删除这些活动端口,请使用 port_cutleaves

As new versions of ports get installed, old versions are changed to an inactive state but remain on the disk. To see these ports:

port list inactive

To remove all inactive ports:

[[ -z "$(port -q list inactive)" ]] || sudo port uninstall inactive

This does not remove active versions of any port, including ports that were only needed during the build of a specific port. As @Mitchell Currie mentioned, use port_cutleaves if you want to remove those active ports.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文