Modifying package states

The following commands are available to modify the states of packages. Commands take effect the next time you perform an install run; until you do, all of these commands can be reversed using 取り消し取り消し (Control+u).

To apply a command to a package, simply select the package in a package list and issue the command. These commands can also be applied to groups of packages by selecting the group header (for instance, Upgradable Packages) and issuing the command.

Install: パッケージインストール (+)

Flag the current package for installation.

If the package is not installed, it will be installed. If it is already installed, it will be upgraded if possible and any sticky upgrade prevention that is in effect (eg, Hold) will be cancelled.

Remove: パッケージ削除 (-)

Flag the currently selected package for removal.

If the package is installed, it will be removed.

Purge: パッケージ完全削除 (_)

Flag the current package to be purged.

If the package is installed, it will be removed. Furthermore, even if it is removed, any remaining files (such as configuration files) related to the package will be removed from the system.

Keep: パッケージ一時固定 (:)

Flag the current package to be kept at its current version.

Any action that was to be performed on the package -- installation, removal, or upgrade -- is cancelled, and any persistent hold that was set on the package is removed.

Hold: パッケージ固定 (=)

Set a persistent hold on the package.

As with Keep, any action that was to be performed on the package is cancelled. In addition, the package will not be automatically upgraded [a] until the hold is removed. You may cancel a hold by issuing the Install command.

パッケージバージョンの禁止 (F)

The package will not be automatically upgraded[a] to the version it would currently be upgraded to. If it was going to be upgraded, the upgrade will be cancelled.

If you issue this command on a particular version of a package, the package will not be upgraded to the selected version. Note that only one version can be forbidden at once.

This functionality is largely provided as a convenience for users of the unstable distribution, so they can avoid known-bad versions of packages.

Reinstall: PackageReinstall (L)

Flag the current package for reinstallation.

Note that the reinstallation will not be saved when you quit aptitude or perform an install run, for technical reasons (essentially, the underlying software layers (dpkg and apt) do not provide any way to find out whether a reinstallation was successful or not).

パッケージ自動的にインストールされたという印を添付 (M), パッケージ手動でインストールしたという印を添付 (m) Sets whether the package is treated as having been automatically installed; automatically installed packages will be removed when no other package requires them. For more information, see 「自動的にインストールされたパッケージの管理」.

[a] That is, it will be unaffected by アクション更新可能パッケージという印を添付 (U) or the full-upgrade or safe-upgrade command-line actions.

In addition to these commands that affect the selected package, there are two commands that affect large numbers of packages at once regardless of what is selected. アクション新規パッケージ一覧の消去 (f) clears the new status of all packages in the package list, and アクション更新可能パッケージという印を添付 (U) flags every package which can be upgraded for upgrade, except for packages that are held back or would be upgraded to a forbidden version.


All changes to package states are saved when you quit aptitude, update the package list, or perform an install run. If you do not wish to save your changes, you can always abort aptitude by pressing Ctrl-C.