APTITUDE(8) | Command-line reference | APTITUDE(8) |
名前¶
aptitude - パッケージマネージャの高レベルインタフェース
概要¶
aptitude [<options>...] {autoclean | clean | forget-new | keep-all | update}
aptitude [<options>...] {full-upgrade | safe-upgrade} [<packages>...]
aptitude [<options>...] {build-dep | build-depends | changelog | download | forbid-version | hold | install | markauto | purge | reinstall | remove | show | showsrc | source | unhold | unmarkauto | versions} <packages>...
aptitude extract-cache-subset <output-directory> <packages>...
aptitude [<オプション>...] search <パターン>...
aptitude [<options>...] {add-user-tag | remove-user-tag} <tag> <packages>...
aptitude [<options>...] {why | why-not} [<patterns>...] <package>
aptitude [-S <fname>] [--autoclean-on-startup | --clean-on-startup | -i | -u]
aptitude help
説明¶
aptitude は Debian GNU/Linux のパッケージシステムに対するテキストベースのインタフェースです。
ユーザはパッケージの一覧を表示したり、パッケージのインストール・更新・削除などといったパッケージ管理作業を行ったりできます。アクションはビジュアルインタフェースとコマンドラインから行えます。
COMMAND-LINE ACTIONS¶
ハイフン (「-」) から始まらない最初の引数は、プログラムが行うアクションだと見なされます。アクションがコマンドラインで与えられない場合、aptitude はビジュアルモードで起動します。
以下のアクションが利用可能です。
install
To select a particular version of the package, append 「=<version>」 to the package name: for instance, 「aptitude install apt=0.3.1」. Similarly, to select a package from a particular archive, append 「/<archive>」 to the package name: for instance, 「aptitude install apt/experimental」. You cannot specify both an archive and a version for a package.
必ずしも、コマンドラインに連ねられたパッケージすべてがインストール対象でなければいけないわけではありません。パッケージ名に「上書き指定子」を付記すると、そのパッケージに対して aptitude に別のことをさせることが可能です。例えば、aptitude remove wesnoth+ とすると、wesnoth を削除ではなくインストールできます。以下の上書き指定子が利用可能です。
<パッケージ>+
If the package was not installed, it is marked as manually installed, and the dependencies newly installed are marked with the automatic flag. If the package or the dependencies were already installed, the automatic flag is preserved. See the section about automatic installations in the documentation for more information.
<パッケージ>+M
<パッケージ>-
<パッケージ>_
<パッケージ>=
<パッケージ>:
<パッケージ>&M
<パッケージ>&m
<package>&BD
特別な場合として、引数を与えずに「install」を実行すると、保存されているアクションや実行されていないアクションが実行されます。
注記
Once you enter Y at the final confirmation prompt, the 「install」 command will modify aptitude's stored information about what actions to perform. Therefore, if you issue (e.g.) the command 「aptitude install foo bar」 on packages previously uninstalled, and then the installation fails once aptitude has started downloading and installing packages, you will need to run 「aptitude remove foo bar」 to go back to the previous state (and possibly undo installations or upgrades to other packages that were affected by the 「install」 action).
remove, purge, reinstall
例えば、「aptitude remove '~ndeity'」とすると、「deity」を名前に含むパッケージがすべて削除されます。
build-depends, build-dep
If the command-line parameter --arch-only is present, only architecture-dependent build dependencies (i.e., not Build-Depends-Indep or Build-Conflicts-Indep) will be obeyed.
markauto, unmarkauto
自動的にインストールしたパッケージについてのさらに詳しい情報は、aptitude リファレンスマニュアルの「自動的にインストールしたパッケージの管理」セクションを参照してください。
hold, unhold, keep
The difference between hold and keep is that hold will cause a package to be ignored by future safe-upgrade or full-upgrade commands, while keep merely cancels any scheduled actions on the package. unhold will allow a package to be upgraded by future safe-upgrade or full-upgrade commands, without otherwise altering its state.
keep-all
forget-new
This command accepts package names or patterns as arguments. If the string contains a tilde character (「~」) or a question mark (「?」), it will be treated as a search pattern and every package matching the pattern will be considered (see the section 「Search Patterns」 in the aptitude reference manual).
forbid-version
By default, aptitude will select the forbidden version to be the one which the package would normally be upgraded (the candidate version). This may be overridden by appending 「=<version>」 to the package name: for instance, 「aptitude forbid-version vim=1.2.3.broken-4」.
To revert the action, 「aptitude install <package>」 will remove the ban. To remove the forbidden version without installing the candidate version, the current version should be appended: 「install <package>=<version>」.
update
safe-upgrade
If no <package>s are listed on the command line, aptitude will attempt to upgrade every package that can be upgraded. Otherwise, aptitude will attempt to upgrade only the packages which it is instructed to upgrade. The <package>s can be extended with suffixes in the same manner as arguments to aptitude install, so you can also give additional instructions to aptitude here; for instance, aptitude safe-upgrade bash dash- will attempt to upgrade the bash package and remove the dash package.
It is sometimes necessary to remove one package in order to upgrade another; this command is not able to upgrade packages in such situations. Use the full-upgrade command to upgrade as many packages as possible.
full-upgrade
If no <package>s are listed on the command line, aptitude will attempt to upgrade every package that can be upgraded. Otherwise, aptitude will attempt to upgrade only the packages which it is instructed to upgrade. The <package>s can be extended with suffixes in the same manner as arguments to aptitude install, so you can also give additional instructions to aptitude here; for instance, aptitude full-upgrade bash dash- will attempt to upgrade the bash package and remove the dash package.
注記
This command was originally named dist-upgrade for historical reasons, and aptitude still recognizes dist-upgrade as a synonym for full-upgrade.
search
注記
In the example above, 「aptitude search '~N' edit」 has two arguments after search and thus is searching for two patterns: 「~N」 and 「edit」. As described in the search pattern reference, a single pattern composed of two sub-patterns separated by a space (such as 「~N edit」) matches only if both patterns match. Thus, the command 「aptitude search '~N edit'」 will only show 「new」 packages whose name contains 「edit」.
i apt - Advanced front-end for dpkg pi apt-build - frontend to apt to build, optimize and in cp apt-file - APT package searching utility -- command- ihA raptor-utils - Raptor RDF Parser utilities
検索結果はそれぞれ異なる行に一覧表示されます。各行の第 1 文字はパッケージの現在の状態を示します。最もありふれた状態は、システムにパッケージが存在した形跡がないという意味の p、パッケージが削除されたがシステムに設定ファイルが残っているという意味の c、パッケージがインストールされているという意味の i、パッケージが仮想パッケージであるという意味の v です。第 2 文字は、パッケージに対して行うよう保存されたアクションを示します (アクションが存在する場合で、なければ空欄が表示されます)。最もありふれた状態は、パッケージがインストール予定であるという意味の i、パッケージが削除予定であるという意味の d、パッケージおよびその設定ファイルが削除予定であるという意味の p です。第 3 文字が A である場合、そのパッケージは自動的にインストールされたものです。
For a complete list of the possible state and action flags, see the section 「Accessing Package Information」 in the aptitude reference guide. To customize the output of search, see the command-line options -F and --sort.
show
饒舌レベルが 1 以上の場合 (つまり、コマンドラインに -v が 1 つ以上与えられている場合)、そのパッケージのすべてのバージョンについて情報が表示されます。それ以外の場合は「バージョン候補」(「aptitude install」がダウンロードするバージョン) に関する情報が表示されます。
You can display information about a different version of the package by appending =<version> to the package name; you can display the version from a particular archive or release by appending /<archive> or /<release> to the package name: for instance, /unstable or /sid. If either of these is present, then only the version you request will be displayed, regardless of the verbosity level.
饒舌レベルが 1 以上の場合、パッケージのアーキテクチャ・圧縮サイズ・ファイル名・md5sum の各フィールドが表示されます。饒舌レベルが 2 以上の場合、各アーカイブについて、そのアーカイブがもつ 1 つ以上の選択バージョンが一度ずつ表示されます。
showsrc
This is a thin wrapper over apt(8).
source
This is a thin wrapper over apt(8).
versions
$ aptitude versions wesnoth p 1:1.4.5-1 100 p 1:1.6.5-1 unstable 500 p 1:1.7.14-1 experimental 1
Each version is listed on a separate line. The leftmost three characters indicate the current state, planned state (if any), and whether the package was automatically installed; for more information on their meanings, see the documentation of aptitude search. To the right of the version number you can find the releases from which the version is available, and the pin priority of the version.
If a package name contains a tilde character (「~」) or a question mark (「?」), it will be treated as a search pattern and all matching versions will be displayed (see the section 「Search Patterns」 in the aptitude reference manual). This means that, for instance, aptitude versions '~i' will display all the versions that are currently installed on the system and nothing else, not even other versions of the same packages.
$ aptitude versions '~nexim4-daemon-light' Package exim4-daemon-light: i 4.71-3 100 p 4.71-4 unstable 500 Package exim4-daemon-light-dbg: p 4.71-4 unstable 500
If the input is a search pattern, or if more than one package's versions are to be displayed, aptitude will automatically group the output by package, as shown above. You can disable this via --group-by=none, in which case aptitude will display a single list of all the versions that were found and automatically include the package name in each output line:
$ aptitude versions --group-by=none '~nexim4-daemon-light' i exim4-daemon-light 4.71-3 100 p exim4-daemon-light 4.71-4 unstable 500 p exim4-daemon-light-dbg 4.71-4 unstable 500
To disable the package name, pass --show-package-names=never:
$ aptitude versions --show-package-names=never --group-by=none '~nexim4-daemon-light' i 4.71-3 100 p 4.71-4 unstable 500 p 4.71-4 unstable 500
In addition to the above options, the information printed for each version can be controlled by the command-line option -F. The order in which versions are displayed can be controlled by the command-line option --sort. To prevent aptitude from formatting the output into columns, use --disable-columns.
add-user-tag, remove-user-tag
User tags are arbitrary strings associated with a package. They can be used with the ?user-tag(<tag>) search term, which will select all the packages that have a user tag matching <tag>.
why, why-not
This command searches for packages that require or conflict with the given package. It displays a sequence of dependencies leading to the target package, along with a note indicating the installed state of each package in the dependency chain:
$ aptitude why kdepim i nautilus-data Recommends nautilus i A nautilus Recommends desktop-base (>= 0.2) i A desktop-base Suggests gnome | kde | xfce4 | wmaker p kde Depends kdepim (>= 4:3.4.3)
The command why finds a dependency chain that installs the package named on the command line, as above. Note that the dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the kdepim package; if a stronger dependency were available, aptitude would have displayed it.
In contrast, why-not finds a dependency chain leading to a conflict with the target package:
$ aptitude why-not textopo i ocaml-core Depends ocamlweb i A ocamlweb Depends tetex-extra | texlive-latex-extra i A texlive-latex-extra Conflicts textopo
If one or more <pattern>s are present (in addition to the mandatory last argument, which should be a valid <package> name), then aptitude will begin its search at these patterns. That is, the first package in the chain it prints to explain why <package> is or is not installed, will be a package matching the pattern in question. The patterns are considered to be package names unless they contain a tilde character (「~」) or a question mark (「?」), in which case they are treated as search patterns (see the section 「Search Patterns」 in the aptitude reference manual).
If no patterns are present, then aptitude will search for dependency chains beginning at manually installed packages. This effectively shows the packages that have caused or would cause a given package to be installed.
注記
aptitude why does not perform full dependency resolution; it only displays direct relationships between packages. For instance, if A requires B, C requires D, and B and C conflict, 「aptitude why-not D」 will not produce the answer 「A depends on B, B conflicts with C, and D depends on C」.
If the verbosity level is 1 or more, then all the explanations aptitude can find will be displayed, in inverse order of relevance. If the verbosity level is 2 or more, a truly excessive amount of debugging information will be printed to standard output.
This command returns 0 if successful, 1 if no explanation could be constructed, and -1 if an error occurred.
clean
autoclean
changelog
By default, the changelog for the version which would be installed with 「aptitude install」 is downloaded. You can select a particular version of a package by appending =<version> to the package name; you can select the version from a particular archive or release by appending /<archive> or /<release> to the package name (for instance, /unstable or /sid).
download
This is a thin wrapper over apt(8).
extract-cache-subset
Dependencies in binary package stanzas will be rewritten to remove references to packages not in the selected set.
help
オプション¶
以上のアクションの振る舞いを変更するのに、以下のオプションが利用可能です。どのオプションも全てのコマンドに使えますが、オプションによっては特定のコマンドに適用できず無視されます。
--add-user-tag <tag>
--add-user-tag-to <tag>,<pattern>
For instance, aptitude safe-upgrade --add-user-tag-to "new-installs,?action(install)" will add the tag new-installs to all the packages installed by the safe-upgrade command.
--allow-new-upgrades
--allow-new-installs
--allow-untrusted
--disable-columns
For instance, the first few lines of output from 「aptitude search -F '%p %V' --disable-columns libedataserver」 might be:
disksearch 1.2.1-3 hp-search-mac 0.1.3 libbsearch-ruby 1.5-5 libbsearch-ruby1.8 1.5-5 libclass-dbi-abstractsearch-perl 0.07-2 libdbix-fulltextsearch-perl 0.73-10
As in the above example, --disable-columns is often useful in combination with a custom display format set using the command-line option -F.
This corresponds to the configuration option Aptitude::CmdLine::Disable-Columns.
-D, --show-deps
これは設定オプション Aptitude::CmdLine::Show-Deps に相当します。
-d, --download-only
これは設定オプション Aptitude::CmdLine::Download-Only に相当します。
-F <フォーマット>, --display-format <フォーマット>
The command-line option --disable-columns is often useful in combination with -F.
For search, this corresponds to the configuration option Aptitude::CmdLine::Package-Display-Format; for versions, this corresponds to the configuration option Aptitude::CmdLine::Version-Display-Format.
-f
これは設定項目 Aptitude::CmdLine::Fix-Broken に相当します。
--full-resolver
This option can be used to force the use of the full resolver even when Aptitude::Always-Use-Safe-Resolver is true.
--group-by <grouping-mode>
This corresponds to the configuration option Aptitude::CmdLine::Versions-Group-By.
-h, --help
--log-file=<file>
This does not affect the log of installations that aptitude has performed (/var/log/aptitude); the log messages written using this configuration include internal program events, errors, and debugging messages. See the command-line option --log-level to get more control over what gets logged.
This corresponds to the configuration option Aptitude::Logging::File.
--log-level=<level>, --log-level=<category>:<level>
--log-level=<category>:<level> causes messages in <category> to only be logged if their level is <level> or higher.
--log-level may appear multiple times on the command line; the most specific setting is the one that takes effect, so if you pass --log-level=aptitude.resolver:fatal and --log-level=aptitude.resolver.hints.match:trace, then messages in aptitude.resolver.hints.parse will only be printed if their level is fatal, but all messages in aptitude.resolver.hints.match will be printed. If you set the level of the same category two or more times, the last setting is the one that will take effect.
This does not affect the log of installations that aptitude has performed (/var/log/aptitude); the log messages written using this configuration include internal program events, errors, and debugging messages. See the command-line option --log-file to change where log messages go.
This corresponds to the configuration group Aptitude::Logging::Levels.
--log-resolver
--no-new-installs
This mimics the historical behavior of apt-get upgrade.
--no-new-upgrades
--no-show-resolver-actions
-O <順序>, --sort <順序>
Prepending the order keyword with a tilde character (~) reverses the order from ascending to descending.
The default sort order is name,version.
-o <キー>=<値>
-P, --prompt
これは設定オプション Aptitude::CmdLine::Always-Prompt に相当します。
--purge-unused
This corresponds to the configuration option Aptitude::Purge-Unused.
-q[=<n>], --quiet[=<n>]
任意で =<n> をつけると、出力の少なさを直接設定できます (例えば、/etc/apt/apt.conf の設定を上書きするのに利用できます)。このときプログラムは、-q をちょうど <n> 回与えたときのように振る舞います。
-R, --without-recommends
This corresponds to the pair of configuration options APT::Install-Recommends and APT::AutoRemove::RecommendsImportant.
-r, --with-recommends
This corresponds to the configuration option APT::Install-Recommends
--remove-user-tag <tag>
--remove-user-tag-from <tag>,<pattern>
For instance, aptitude safe-upgrade --remove-user-tag-from "not-upgraded,?action(upgrade)" will remove the not-upgraded tag from all packages that the safe-upgrade command is able to upgrade.
-s, --simulate
これは設定オプション Aptitude::Simulate に相当します。
--safe-resolver
This option is equivalent to setting the configuration variable Aptitude::Always-Use-Safe-Resolver to true.
--schedule-only
例えば、aptitude --schedule-only install evolution を実行すると、evolution パッケージを後でインストールするよう設定できます。
--show-package-names <when>
This option corresponds to the configuration item Aptitude::CmdLine::Versions-Show-Package-Names.
--show-resolver-actions
When executing the command safe-upgrade or when the option --safe-resolver is present, aptitude will display a summary of the actions performed by the resolver before printing the installation preview. This is equivalent to the configuration option Aptitude::Safe-Resolver::Show-Resolver-Actions.
--show-summary[=<MODE>]
<MODE> can be any one of the following:
This option corresponds to the configuration item Aptitude::CmdLine::Show-Summary; if --show-summary is present on the command-line, it will override Aptitude::CmdLine::Show-Summary.
例12 Usage of --show-summary --show-summary used with -v to display all the reasons a package is installed:
$ aptitude -v --show-summary why foomatic-db Packages requiring foomatic-db:
cupsys-driver-gutenprint
foomatic-db-engine
foomatic-db-gutenprint
foomatic-db-hpijs
foomatic-filters-ppds
foomatic-gui
kde
printconf
wine $ aptitude -v --show-summary=first-package-and-type why foomatic-db Packages requiring foomatic-db:
[Depends] cupsys-driver-gutenprint
[Depends] foomatic-db-engine
[Depends] foomatic-db-gutenprint
[Depends] foomatic-db-hpijs
[Depends] foomatic-filters-ppds
[Depends] foomatic-gui
[Depends] kde
[Depends] printconf
[Depends] wine $ aptitude -v --show-summary=all-packages why foomatic-db Packages requiring foomatic-db:
cupsys-driver-gutenprint D: cups-driver-gutenprint D: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
foomatic-filters-ppds D: foomatic-filters R: foomatic-db-engine D: foomatic-db
kde D: kdeadmin R: system-config-printer-kde D: system-config-printer R: hal-cups-utils D: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
wine D: libwine-print D: cups-bsd R: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
foomatic-db-engine D: foomatic-db
foomatic-db-gutenprint D: foomatic-db
foomatic-db-hpijs D: foomatic-db
foomatic-gui D: python-foomatic D: foomatic-db-engine D: foomatic-db
printconf D: foomatic-db $ aptitude -v --show-summary=all-packages-with-dep-versions why foomatic-db Packages requiring foomatic-db:
cupsys-driver-gutenprint D: cups-driver-gutenprint (>= 5.0.2-4) D: cups (>= 1.3.0) R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
foomatic-filters-ppds D: foomatic-filters R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
kde D: kdeadmin (>= 4:3.5.5) R: system-config-printer-kde (>= 4:4.2.2-1) D: system-config-printer (>= 1.0.0) R: hal-cups-utils D: cups R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
wine D: libwine-print (= 1.1.15-1) D: cups-bsd R: cups R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
foomatic-db-engine D: foomatic-db
foomatic-db-gutenprint D: foomatic-db
foomatic-db-hpijs D: foomatic-db
foomatic-gui D: python-foomatic (>= 0.7.9.2) D: foomatic-db-engine D: foomatic-db (>= 20090301)
printconf D: foomatic-db
--show-summary used to list a chain on one line:
$ aptitude --show-summary=all-packages why aptitude-gtk libglib2.0-data Packages requiring libglib2.0-data:
aptitude-gtk D: libglib2.0-0 R: libglib2.0-data
-t <リリース>, --target-release <リリース>
This will affect the default candidate version of packages according to the rules described in apt_preferences(5).
これは設定項目 APT::Default-Release に相当します。
-V, --show-versions
これは設定オプション Aptitude::CmdLine::Show-Versions に相当します。
-v, --verbose
これは設定オプション Aptitude::CmdLine::Verbose に相当します。
--version
--visual-preview
-W, --show-why
$ aptitude --show-why install mediawiki ... The following NEW packages will be installed:
libapache2-mod-php5{a} (for mediawiki) mediawiki php5{a} (for mediawiki)
php5-cli{a} (for mediawiki) php5-common{a} (for mediawiki)
php5-mysql{a} (for mediawiki)
When combined with -v or a non-zero value for Aptitude::CmdLine::Verbose, this displays the entire chain of dependencies that lead each package to be installed. For instance:
$ aptitude -v --show-why install libdb4.2-dev The following NEW packages will be installed:
libdb4.2{a} (libdb4.2-dev D: libdb4.2) libdb4.2-dev The following packages will be REMOVED:
libdb4.4-dev{a} (libdb4.2-dev C: libdb-dev P<- libdb-dev)
This option will also describe why packages are being removed, as shown above. In this example, libdb4.2-dev conflicts with libdb-dev, which is provided by libdb-dev.
This argument corresponds to the configuration option Aptitude::CmdLine::Show-Why and displays the same information that is computed by aptitude why and aptitude why-not.
-w <幅>, --width <幅>
By default and when the output is seen directly in a terminal, the terminal width is used. When the output is redirected or piped, a very large "unlimited" line width is used, and this option is ignored.
これは設定オプション Aptitude::CmdLine::Package-Display-Width に相当します。
-y, --assume-yes
これは設定オプション Aptitude::CmdLine::Assume-Yes に相当します。
-Z
これは設定オプション Aptitude::CmdLine::Show-Size-Changes に相当します。
以下のオプションがプログラムのビジュアルモードに適用できますが、これらは主に内部で使用するためのものです。あなたがこれらを自分で使う必要は、通常はありません。
--autoclean-on-startup
--clean-on-startup
-i
-S <ファイル名>
-u
環境変数¶
HOME
PAGER
TMP
TMPDIR
FILES¶
/var/lib/aptitude/pkgstates
/etc/apt/apt.conf, /etc/apt/apt.conf.d/*, ~/.aptitude/config
SEE ALSO¶
apt-get(8), apt(8), aptitude-doc-<言語> パッケージの /usr/share/doc/aptitude/html/<言語>/index.html
著者¶
Burrows Daniel[FAMILY Given] <dburrows@debian.org>
Fernandez Montecelo Manuel A.[FAMILY Given] <mafm@debian.org>
製作著作¶
Copyright 2004-2011 Daniel Burrows.
Copyright 2014-2016 Manuel A. Fernandez Montecelo
This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
06/08/2022 | aptitude 0.8.13 |