指令名稱:deborphan
簡要功能說明:
在 debian 系統中找尋沒有任何 dependency 的 package。
詳細說明:
deborphan 會檢查目前系統中有那些 packages 是沒有任何 package depends on it。也就是刪除了也不會影響到別人, 但預設只會搜尋 libs 和 oldlibs。
以下用[ ]中括號括起來的表示 optional(可有可無)
另外 deborphan 中有附二個前端程式 orphaner 和 editkeep, 各位可試看看。
而 deborphan 可和 debfoster 配合使用, 將系統清得乾乾淨淨。
參數:
-f, --status-file=FILE
Use FILE as the status file.
-d, --show-deps
Show a list of dependencies for packages that have them.
-P, --show-priority
Show the priority of the packages found.
-n, --nice-mode
Toggle nice-mode. If DEFAULT_NICE is defined at compiletime, this
option will turn off nice-mode. Nice-mode checks if there is a
package `suggesting' or `recommending' the package. If one is
found, the package will be marked as in use, or, when -s is used,
print out the package suggesting the package as if it were
depending on it.
-a, --all-packages
Check all the packages, instead of only those in the libs sec-
tion. Best used (if at all used) in combination with --priority.
This option implies --show-section, when compiled with ALL_PACK-
AGES_IMPLY_SECTION defined (default)
-s, --show-section
Show the sections the packages are in.
--no-show-section
Override showing sections when the default is to show them (see
--all-packages).
-p, --priority=PRIORITY
Show only those packages with a priority equal to, or greater
than PRIORITY. PRIORITY may be in the range of 1-5, or one of
required, important, standard, optional, extra. Default value for
PRIORITY is 2 (important).
-H, --force-hold
Ignore "hold" flags on packages. Normally packages with the
"hold" flag set will not be displayed.
-A, --add-keep PKG1...PKGn
Add packages to the list of packages which are never to be
reported, regardless of their state. You may specify '-' to use
standard input. Note that package names are case-sensitive.
-R, --del-keep PKG1...PKGn
Remove packages from the list of packages which are never to be
reported. You may specify '-' to use standard input. If there
are no dependencies for this package next time deborphan is
invoked, it will be reported again.
-L, --list-keep
Show the list of packages that are being kept back.
-Z, --zero-keep
Purge the entire list of packages that are being kept back. The
only option possible in combination with this option is -A.
-k, --keep-file=FILE
Use FILE to store the list of kept-back packages. See also --add-
keep.
--df-keep
Use debfoster's keepfile, regardless of the default setting. Can
not be used if deborphan was compiled without support for debfos-
ter.
--no-df-keep
Do not use debfoster's keepfile.
--find-config
This option searches for uninstalled packages which still have
configuration files on the system. It implies the -a option.
--guess-*
See GUESSING below.
範例:
deborphan
搜尋系統中的孤兒, 但只會搜尋區段(section) 為 libs 和 oldlibs。
deborphan --all-packages
不只找尋 libs 和 oldlibs, 而是全部的區段都檢查。
deborphan --show-deps package_name
顯示 package_name 的 dependency 列表, 包括 Recommends(建議的 package)。
deborphan --show-priority [package_name]
顯示優先權(priority)
deborphan --show-section
將顯示結果加上屬於那個區段。
deborphan --no-show-section
配合 --all-packages 來使用, 預設 --all-packages 會秀出 package 是屬於那個區段, 加上此參數, 就不會顯示。
deborphan --priority=PRIORITY
只顯示優先權為 PRIORITY 的 package
deborphan --force-hold
預設 hold 的 package 不會顯示, 若連 hold 的 package 也要顯示, 設此參數即可。
deborphan --add-keep [PKG1...PKGn]
將 package 加入 deborphan 的 keep file 中, 這樣子以後 keep file 中的 package 就不會再顯示出來了。
keep file 預設為 /var/lib/deborphan/keep
deborphan --del-keep PKG1...PKGn
將 keep file 中的 package 刪除。
deborphan --keep-file=FILE
將 keep file 指定為 FILE, 不使用預設的。
deborphan --list-keep
顯示 keep file 的內容
deborphan --zero-keep
將 keep file 清空。
deborphan --df-keep
使用 debfoster 的 keep file, 並忽略預設值。
先決條件是 deborphan 在 compile 時要支援 debfoster。
deborphan --no-df-keep
不用使用 debfoster 的 keep file。
deborphan --find-config
這是 deborphan 的特異功能, 能找到系統中有那些 packages 已被移除, 但設定檔仍留著。