Ubuntu aptitude 命令详解


aptitude 和 apt-get 一样,是 Debian 及其衍生系统中功能极其强大的包管理工具。

不同的是,aptitude 在处理依赖问题上要更好一些。 aptitude 整合了 dselect 和 apt-get 的所有功能, 并提供了更多特性,特别是在依赖关系的处理上。


譬如:aptitude 在删除一个包时,会同时删除本身所依赖的包。 这样的话,系统中不会残留无用的包,整个系统会更为干净。

另请参阅: apt-get

 

基本用法     详细用法

uname -a

 

基本语法

aptitude [-S fname] [-u|-i]

aptitude [options] <action> ...

 

注意:

aptitude 没有 Super Cow Powers。

 

Options

参数 EN 解释 中文翻译 备注
h This help text.
--no-gui Do not use the GTK GUI even if available.
-s Simulate actions, but do not actually perform them.
-d Only download packages, do not install or remove anything.
P ways prompt for confirmation of actions.
-y Assume that the answer to simple yes/no questions is 'yes'.
F forma Specify a format for displaying search results; see the manual.
O Specify how search results should be sorted; see the manual.
w width Specify the display width for formatting search results.
f vely try to fix broken packages.
V Show which versions of packages are to be installed.
D Show the dependencies of automatically changed packages.
Z Show the change in installed size of each package.
v Display extra information. (may be supplied multiple times).
[release] Set the release from which packages should be installed.
q In command-line mode, suppress the incremental progress indicators.
key=va Directly set the configuration option named 'key'.
with(out)-recomm Specify whether or not to treat recommends as strong dependencies.
S fnam Read the aptitude extended status info from fname.
-u Download new package lists on startup. (terminal interface only)
i Perform an install run on startup. (terminal interface only)

 

Action

参数 EN 解释 中文翻译 备注
insta Install/upgrade packages. 安装/升级 包。
mov Remove packages. 移除包。
purg Remove packages and their configuration files. 移除包及其配置文件。
hold Place packages on hold.
unh Cancel a hold command for a package.
m Mark packages as having been automatically installed.
unmarkau Mark packages as having been manually installed.
forbid-v Forbid aptitude from upgrading to a specific package version.
upda Download lists of new/upgradable packages. 下载 新/可升级 包列表。
fe-up Perform a safe upgrade. 履行安全升级。
full-upgra Perform an upgrade, possibly installing and removing packages.
p Install the build-dependencies of packages.
forget-new Forget what packages are "new".
search Search for a package by name and/or expression. 按名称 和/或 表达式搜索包。
how Display detailed information about a package. 显示包详细信息。
v Displays the versions of specified packages.
an Erase downloaded package files. 擦除已下载的包文件。
autoclean Erase old downloaded package files. 擦除旧的已下载的包文件。
hangelog View a package's changelog.
w Download the .deb file for a package.
insta Download and (possibly) reinstall a currently installed package.
w

Show the manually installed packages that require a package,

or why one or more packages would require the given package.

why-n

Show the manually installed packages that lead to a conflict with the given package,

or why one or more packages would lead to a conflict with the given package if installed.

数字 Python IDE

数字 Python IDE

Windows Vista / 7 / 8 / 10 (x64 位)

下载     网盘 1     网盘 2     网盘 3 (提取码 cs7s)

 

数字网页 IDE

数字网页 IDE

Windows Vista / 7 / 8 / 10 (x64 位)

下载     网盘 1     网盘 2     网盘 3 (提取码 cs7s)

 

数字翻译

数字翻译

Windows Vista / 7 / 8 / 10 (x64 位)

下载     网盘 1     网盘 2     网盘 3

 

数字管家

数字管家

Windows Vista / 7 / 8 / 10 (x64 位)

下载     网盘 1     网盘 2     网盘 3

详细用法

功能 命令规范 文字解释 示例 示例解释
安装 aptitude install pkgnam 安装/升级 包 pkgnam
移除 ptitude remove pkgnam 移除包 pkgnam
清洁移除 aptitude purge pkgnam 移除包 pkgname 及其配置文件
更新 ptitude up 下载 新/可升级 包列表
升级 aptitude upgra 升级可用包
aptitude dist-upgra 将系统升级到新发行版
搜索 ptitude search pkgnam 按名称 pkgname 搜索包
ptitude search exp 按表达式 expression 搜索包
展示 aptitude show pkgnam 显示包 pkgname 的详细信息
清理 p 擦除已下载的包文件
p 擦除旧的已下载的包文件