(from http://www.yatblog.com/2007/04/22/cleaning-up-your-ubuntu-installation/)
After upgrading my Ubuntu 6.10 installation to the newest 7.04 (Feisty Fawn) over a thousand packages were upgraded. So it’s obvious that there were left some dependencies which are not needed anymore. Sure everything still works, but I like to clean up things on Operating Systems I use productively. That’s why I wrote a script to clean up those dependencies with a single command. Here’s what you should do if you want to clean up your Ubuntu Installation (no matter which version) as well:
- Download and install the deborphan package. This is the application that finds unnecessary dependencies: “sudo apt-get install deborphan”
- Execute this command until there are no more dependencies: “apt-get remove $(deborphan)”
Alternatively, you can also put that command into a script, if you don’t want to remember that line:
- Download the script here: del_orph_pkgs.txt
- Change the filename from “del_orph_pkgs.txt” to “del_orph_pkgs.sh” and do a “chmod +x del_orph_pkgs.sh” so we can execute it.
- Execute the script with “sudo del_orph_pkgs.sh” multiple times until it won’t find anymore dependencies. This is necessary, because those libraries, which are not needed anymore, might have dependencies them self, which become obsolete. So another execution cycle will eliminate those as well.
本文提供了一种简单的方法来清理Ubuntu系统中不再需要的依赖包。通过安装并使用deborphan工具,可以有效地移除那些因为软件更新或卸载而遗留下来的孤儿包,确保系统的整洁与高效。

被折叠的 条评论
为什么被折叠?



