介绍Debian里一个删除无用软件的工具debfoster,原文看这里

指令名稱:debfoster

簡要功能說明:去除 debian 中沒有用到的package, 以避免經過日積月累的使用後, 系統中多了一堆用不到的 package

詳細說明:各位應該都有過這種經驗, 有時安裝了某個 package, 結果由於 dependency, 裝了一大堆的 packages, 等到您覺得這個 package 不想用了, 要將之除去而後快時, apt-get 並無法將之前因為 dependency 而裝的任何 packages 給全部清乾淨, 尤其是一些 develop 的 library。而某些時候就算是知道那些 package, 但是要一一手動去刪, 也是很麻煩的。
另外, debfoster 也可拿來安裝和移除 package 用, 方便好用。
由於 debfoster 必須要知道现在系統中那些 package 是要留著, 那些要移除, 所以剛裝好時, debfoster 會問您一坨問題, 那個 package 要保留, 所以第一次是比較辛苦的, 等到全部回答完成後, 以後有安裝新的 package, 就只會問您新的 package 要不要保留, 假如不確定那是什麼東東, 可按 I or ? 來看现在這個 package 的資訊, 以確定是否移除。
debfoster 也只是 apt-get 和 dpkg 的 frontend 而已。

參數:
Command line options
-v, --verbose
debfoster will show which packages have disappeared, have become
dependencies or (if Quiet is enabled) have become orphans.

-V, --version
Display version and copyright information.

-h, --help
Display a concise summary of the available options and argument
syntax.

-f, --force
Don't ask anything and assume 'no' as the answer to all questions.
It also installs any packages that seem to be missing, thus forc-
ing your system to comply with the debfoster database. Can have
'interesting' results if you're not careful.

-q, --quiet
Don't ask anything and assume 'yes' as the answer to all ques-
tions. Useful to create an initial /var/lib/debfoster/keepers
file or to recreate it after changing the configuration file.

-m, --mark-only
Instructs debfoster to make changes to the keeper file but not to
actually install or delete any packages. This can be used to
'edit' a keeper file by invoking debfoster one or more times in a
row. The changes can then be committed by invoking debfoster with
the --force option, which will delete/install any necessary pack-
ages. This is mainly useful for scripts and frontends, but may be
useful from the command line as well.

-u, --upgrade
If used as 'debfoster -u package' it will install or upgrade the
packages specified on the command line and try to upgrade all
packages that it relies on.

-c, --config file
Specify a different configuration file to use.

-k, --keeperfile file
Specify a different debfoster database to use.

-n, --no-keeperfile
Don't read the debfoster database and start with an empty list.

-i, --ignore-default-rules
This will instruct debfoster to ignore the UseHold, UseEssential,
MaxPriority, KeepSections, and NokeepSections settings in the con-
fig file (i.e., assume that any package can be an orphan). This is
a good option for those who really want to make sure their system
is squeaky clean. It's also useful when sharing or transferring a
keeper file between multiple machines where different config files
can cause some confusion. Properly used, -i eliminates that uncer-

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!