Cleaning up your Ubuntu Installation

(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:

  1. Download and install the deborphan package. This is the application that finds unnecessary dependencies: “sudo apt-get install deborphan”
  2. 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:

  1. Download the script here: del_orph_pkgs.txt
  2. 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.
  3. 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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值