Search term reference

表2.3「Quick guide to search terms」 provides a brief summary of all the search terms provided by aptitude. A full description of each term can be found below.

表2.3 Quick guide to search terms

Long formShort form説明
?=variable   Select the package bound to variable; see 「Explicit search targets」.
?not(pattern)!pattern Select any package that does not match pattern.
?action(action) ~aaction Select packages that have been marked for the given action (e.g., install or upgrade).
?all-versions(pattern)   Select packages whose versions all match pattern.
?and(pattern1, pattern2) pattern1 pattern2 Select any package that matches both pattern1 and pattern2.
?any-version(pattern)  Select packages for which at least one version matches pattern.
?architecture(architecture) ~rarchitecture Select packages for the given architecture (such as amd64, or all). Special values: native and foreign.
?archive(archive) ~Aアーカイブ Select packages from the given archive (such as unstable).
?automatic~M Select packages that were automatically installed.
?bind(variable, pattern) ?variable:term-name[(args)] Selects anything if variable matches pattern; see 「Explicit search targets」.
?broken~b Select packages that have a broken dependency.
?broken-depType~BdepType Select package that have a broken dependency of the given depType.
?broken-depType(pattern)~DB[depType:]pattern Select packages that have a broken dependency of the given depType matching pattern.
?broken-reverse-depType(pattern)~RBdepType:pattern Select packages that a package matching pattern declares a broken dependency of type depType.
?conflicts(pattern) ~Cpattern Select packages that conflict with a package matching pattern.
?config-files~c Select packages that were removed but not purged.
?depType(pattern)~D[depType:]pattern Match packages that declare a dependency of type depType on a package matching pattern.
?description(description)~d説明 Select packages whose description matches description.
?essential~E Select essential packages, those with Essential: yes in their control files.
?exact-name(name)  Select packages named name.
?false~F Select no packages.
?for variable: pattern  Select packages that match pattern with variable bound to the package being matched; see 「Explicit search targets」.
?garbage~g Select packages that are not required by any manually installed package.
?installed~iSelect installed packages.
?maintainer(maintainer)~mメンテナ Select packages maintained by maintainer.
?multiarch(multiarch)  Select packages with a multi-arch capability of multiarch (that is, either foreign, same, allowed, or none).
?narrow(filter, pattern)~S filter pattern Select packages for which a single version matches both filter and pattern.
?name(name)~nname, name Select packages with the given name.
?new~N Select new packages.
?obsolete~o Match installed packages that cannot be downloaded.
?or(pattern1, pattern2)pattern1 | pattern2 Select packages that match pattern1, pattern2, or both.
?origin(origin)~O提供元 Select packages with the given origin.
?provides(pattern)~Ppattern Select packages that provide a package matching pattern.
?priority(priority)~p優先度 Select packages with the given priority.
?reverse-depType(pattern)~R[depType:]pattern Select packages that are the targets of a dependency of type depType declared by a package matching pattern.
?reverse-broken-depType(pattern)~RBdepType:pattern Select packages that are the targets of a broken dependency of type depType declared by a package matching pattern.
?section(section)~sセクション Select packages in the given section.
?source-package(name)~ename Select packages whose source package name matches the regular expression name.
?source-version(version)  Select packages whose source version matches the regular expression version.
?tag(tag)~Gタグ Select packages that have the given debtags tag.
?term(keyword)  Full-text search for packages that contain the given keyword.
?term-prefix(keyword)  Full-text search for packages that contain a keyword that begins with the given keyword.
?true~T Select all packages.
?task(task)~tタスク Select packages that are in the given task.
?upgradable~U Select packages that are installed and can be upgraded.
?user-tag  Select packages that are marked with a user-tag matching the regular expression user-tag.
?version(version)~Vバージョン Select packages whose version matches version (special values: CURRENT, CANDIDATE, and TARGET).
?virtual~v Select virtual packages.
?widen(pattern)~Wpattern Select versions for which pattern matches any version of the corresponding package, discarding local version restrictions.

名前

正規表現名前に名前がマッチするパッケージにマッチします。これはデフォルトの検索モードで、~ で始まらないパターンに使用されます。

[注記]注記

To match packages whose names contain several different substrings, use the ?name term (described below); for instance, ?name(apti)?name(tude) will match any package whose name contains both apti and tude.

?=variable

Matches packages that correspond to the value of variable, which must be bound by an enclosing ?for. For instance, ?for x: ?depends( ?recommends( ?=x ) ) will match any package x that depends on a package which recommends x.

For instance, the following search expression matches packages that conflict with themselves:

例2.2 Use of the ?= term.

?for x: ?conflicts(?=x)


See 「Explicit search targets」 for more information.

?not(pattern), !pattern

Matches packages which do not match the pattern pattern. For instance, ?not(?broken) selects packages that are not broken.

[注記]注記

To include a ! in a search string, it must be escaped by placing a tilde (~) in front of it; otherwise, aptitude will consider it to be part of a ?not term. For instance, to select packages whose description contains extra!, use ?description(extra~!).

?and(pattern1, pattern2), pattern1 pattern2

Matches packages that match both pattern1 and pattern2.

?or(pattern1, pattern2), pattern1 | pattern2

Matches packages that match either pattern1 or pattern2.

[注記]注記

正規表現内で|の文字を使用する場合、この文字を~|エスケープして aptitude に OR 条件を生成させないようにしなければなりません。

(pattern)

Matches pattern. For instance, opengl (perl|python) matches any package whose name contains opengl, and also contains either perl or python.

?action(action), ~aaction

指定されたアクションを実行予定のパッケージにマッチします。アクションには、install (インストール)、upgrade (更新)、downgrade (ダウングレード)、remove (削除)、purge (完全削除)、hold (固定。パッケージが既に固定されているかをテストします)、keep (一時固定。パッケージが変化しないかをテストします) を指定可能です。

[注記]注記

Note that this only tests whether an action is actually queued up to be performed on a package, not whether it could be performed. Thus, for instance, ?action(upgrade) matches exactly those packages that you have already decided to upgrade, not packages which could be upgraded in the future (for that, use ?upgradable).

?all-versions(pattern)

Matches any package whose versions all match the given expression. Each version of a package will be separately tested against pattern, and the package will match if all of its versions match. Packages without versions, such as virtual packages, will always be matched by this search term.

This term may not be used in a context in which the versions to match against have already been narrowed, such as within ?depends or ?narrow. However, it may always be used within ?widen.

?any-version(pattern)

Matches a package if any one of its versions matches the enclosed pattern. This is the dual to ?all-versions.

This term may not be used in a context in which the versions to match against have already been narrowed, such as within ?depends or ?narrow. However, it may always be used within ?widen.

[注記]注記

This term is closely related to ?narrow. In fact, ?any-version(pattern1 pattern2) is exactly the same as ?narrow(pattern1, pattern2).

[注記]注記

To be precise, as with any other pattern, it is not packages but versions of the packages which are matched. For aptitude search and other uses it does not make much difference, but aptitude versions will only show the versions that match, not all versions of the package for which any version matches. For that, use an enclosing ?widen.

?architecture(architecture-spec), ~rarchitecture-spec

Matches package versions for the given architecture-spec. For instance, ?architecture(amd64) matches amd64 packages, while ?architecture(all) matches arch-independent packages.

It also accepts the special values native and foreign, and architecture wildcards (e.g. linux-any or any-amd64), as specified in Policy (11.1 Architecture specification strings).

?archive(archive), ~Aarchive

Matches package versions which are available from an archive that matches the regular expression archive. For instance, ?archive(testing) matches any package available from the testing archive.

?automatic, ~M

自動的にインストールされたパッケージにマッチします。

?bind(variable, pattern), ?variable:term-name[(args)]

Matches any package or version if the given pattern matches the package or version bound to variable, which must be defined in an enclosing ?for.

例2.3 Use of the ?bind term

?for x: ?depends(?depends(?for z: ?bind(x, ?depends(?=z))))

?for x: ?depends(?depends(?for z: ?x:depends(?=z)))


The two search patterns in the above example both match any package x such that x depends on a package y which in turn depends on a package z such that x also depends directly on z. The first pattern uses ?bind directly, while the second one uses an equivalent shorthand syntax.

See 「Explicit search targets」 for more information.

?broken, ~b

Matches packages that are broken: they have an unfulfilled dependency, predependency, breaks, or conflict.

?broken-depType, ~BdepType

Matches packages which have an unfulfilled (broken) dependency of the given depType. depType can be depends, predepends, recommends, suggests, breaks, conflicts, or replaces.

?broken-depType(pattern), ~DB[depType:]pattern

Matches packages with an unsatisfied dependency of type depType on a package matching pattern. depType may be any one of the dependency types listed in the documentation of ?broken-depType.

?conflicts(pattern), ~Cpattern

Matches packages which conflict with a package matching the given pattern. For instance, ?conflicts(?maintainer(dburrows@debian.org)) matches any package which conflicts with a package I maintain.

?config-files, ~c

パッケージ自体は削除済みだが設定ファイルがシステム上に残っているパッケージにマッチします (つまりこれらのパッケージは、削除はされましたが完全削除はされていません)。

?depType(pattern), ~D[depType:]pattern

depType may be any one of the dependency types given in the documentation of ?broken-depType, as well as provides: for instance, ?depends(libpng3) will match any package that depends on libpng3. If the short form (~D) is used and depType is not present, it defaults to depends.

If depType is provides, matches packages that provide a package matching pattern (the equivalent of ?provides). Otherwise, matches packages which declare a dependency of type depType upon a package version which matches pattern.

?description(description), ~ddescription

正規表現説明にパッケージ説明がマッチするパッケージにマッチします。

?essential, ~E

必須パッケージにマッチします。

?exact-name(name)

Matches packages named name. This is similar to ?name, but the name must match exactly. For instance, the following pattern will match only the package apt; with ?name, it would also match aptitude, uvccapture, etc.

例2.4 Use of the ?exact-name term

?exact-name(apt)


?false, ~F

This term does not match any package. [18]

?for variable: pattern

Matches pattern, but the given variable may be used inside pattern to refer to the package or package version this term to.

You can use variable in two ways. To apply a ?-style term to the variable, write ?variable:term-name(args); for instance, ?x:depends(apt). In addition, the term ?=variable will select any package or version that matches the value of the given variable.

For instance, the following term will match any package x that both depends and recommends a second package y.

例2.5 Use of the ?for term

?for x: ?depends( ?for y: ?x:recommends( ?=y ) )


See 「Explicit search targets」 for more information.

?garbage, ~g

インストールされていないか、または自動的にインストールされたが現在はどのインストール済みのパッケージにも依存されていないパッケージにマッチします。

?installed, ~i

現在インストールされているパッケージバージョンにマッチします。

デフォルトでは全てのバージョンがテストされるため、これは通常、現在インストールされているパッケージにマッチします。

?maintainer(maintainer), ~mmaintainer

Matches packages whose Maintainer field matches the regular expression maintainer. For instance, ?maintainer(joeyh) will find all packages maintained by Joey Hess.

?multiarch(multiarch)

Matches packages with the multi-arch capability specified by multiarch. For instance, ?multiarch(foreign) will find all packages which can satisfy dependencies of packages for another architecture. ?multiarch(none) will select packages with no multi-arch capability.

?narrow(filter, pattern), ~S filter pattern

This term narrows the search to package versions matching filter. In particular, it matches any package version which matches both filter and pattern. The string value of the match is the string value of pattern.

?name(name), ~nname

Matches packages whose name matches the regular expression name. For instance, most of the packages that match ?name(^lib) are libraries of one sort or another.

?new, ~N

Matches packages which are new: that is, they have been added to the archive since the last time the list of packages was cleared using アクション新規パッケージ一覧の消去 (f) or the command-line action forget-new.

?obsolete, ~o

This term matches any installed package which is not available in any version from any archive. These packages appear as Obsolete or Locally Installed in the visual interface.

?origin(origin), ~Oorigin

Matches package versions whose origin matches the regular expression origin. For instance, !?origin(debian) will find any unofficial packages on your system (packages not from the Debian archive).

?provides(pattern), ~Ppattern

Matches package versions which provide a package that matches the pattern. For instance, ?provides(mail-transport-agent) will match all the packages that provide mail-transport-agent.

?priority(priority), ~ppriority

Matches packages whose priority is priority; priority must be extra, important, optional, required, or standard. For instance, ?priority(required) matches packages whose priority is required.

?reverse-depType(pattern), ~R[depType:]pattern

depType may be either provides or one of the dependency types given in the documentation of ?broken-depType. If depType is not present, it defaults to depends.

If depType is provides, matches packages whose name is provided by a package version matching pattern. Otherwise, matches packages which a package version matching pattern declares a dependency of type depType upon.

?reverse-broken-depType(pattern), ?broken-reverse-depType(pattern), ~RB[depType:]pattern

depType may be either provides or one of the dependency types given in the documentation of ?broken-depType. If depType is not present, it defaults to depends.

Matches packages which a package version matching pattern declares an unsatisfied dependency of type depType upon.

?section(section), ~ssection

正規表現セクションにセクションがマッチするパッケージにマッチします。

?source-package(name), ~ename

Matches packages whose source package name matches the regular expression name.

?source-version(version)

Matches packages whose source version matches the regular expression version.

?tag(tag), ~Gtag

Matches packages whose Tag field matches the regular expression tag. For instance, the pattern ?tag(game::strategy) would match strategy games.

タグや debtags についてさらに詳しく知りたい場合は、http://debtags.alioth.debian.org を参照してください。

?task(task), ~ttask

正規表現タスクにマッチする名前のタスクに現れるパッケージにマッチします。

?term(keyword)

This term performs a full-text search for keyword in the apt package cache. When used with aptitude search, 検索表示を制限 (l) in the curses front-end, or typed into a package search box in the GTK+ front-end, this term will allow aptitude to accelerate the search using a Xapian index.

?term-prefix(keyword)

This term performs a full-text search for any keyword beginning with keyword in the apt package cache. When used with aptitude search, 検索表示を制限 (l) in the curses front-end, or typed into a package search box in the GTK+ front-end, this term will allow aptitude to accelerate the search using a Xapian index.

This is similar to ?term, but matches extensions of the keyword. For instance, the following search pattern will match any package indexed under the keywords hour, hourglass, hourly, and so on:

例2.6 Use of the ?term-prefix term

?term-prefix(hour)


?true, ~T

This term matches any package. For instance, ?installed?provides(?true) matches installed packages which provide any package.

?upgradable, ~U

この表現は、あらゆる更新可能なインストール済みパッケージにマッチします。

[注記]注記

Note that this only tests whether there are upgrades available for a package, not whether an upgrade could be performed (with actions such as safe-upgrade or full-upgrade).

For instance, there can be upgrades available for several packages, but maybe the upgraded versions of a subset conflict with each other, so they cannot be co-installed or not all of them upgraded at the same time.

?user-tag(tag)

This term matches any package that is marked with a user-tag matching the regular expression tag.

?version(version), ~Vversion

Matches any package version whose version number matches the regular expression version, with the exceptions noted below. For instance, ?version(debian) matches packages whose version contains debian.

バージョンが以下の値の場合は特別扱いを受けます。これらの値を含むバージョン番号を検索するには、値の前にバックスラッシュを置いてください。例えば、バージョン番号に CURRENT を含むパッケージを見つけるには、\CURRENT を用いて検索してください。

  • CURRENT は、現在インストールされているパッケージのバージョンがあればそれにマッチします。

  • CANDIDATE は、パッケージの上で + を押したりそれに対して aptitude install を実行したりした場合にインストールされるパッケージのバージョンがあれば、それにマッチします。

  • TARGET は、現在インストール対象になっているパッケージのバージョンがあればそれにマッチします。

?virtual, ~v

Matches any package which is purely virtual: that is, its name is provided by a package, but no package of that name exists. For instance, ?virtual?reverse-provides(?installed) matches virtual packages which are provided by any installed package.

?widen(pattern), ~Wpattern

Widens the match: if the versions to match against have been limited by an enclosing term (such as ?depends), these limits are dropped. Thus, ?widen(pattern) matches a package version if pattern matches any version of that package.



[18] This is provided largely for symmetry with ?true.