apt その2

aptデータベースを更新する

apt-get update
auto-apt update

パッケージを更新する(Replaces, Conflictsが起こらないものに関して最新にする)

apt-get upgrade

パッケージを更新する(すべて最新にする)

apt-get dist-upgrade

パッケージを探す

apt-cache search
apt-cache -n*1 search

ファイルから逆引き

auto-apt search
dpkg --search

パッケージを調べる

apt-cache show
apt-cache showsrc
apt-cache showpkg
apt-cache depends
apt-cache rdepends
apt-cache policy
dpkg -l
dpkg -L
dpkg --status *2

試す(simulate)

apt-get -s install
apt-get -s remove
apt-get -s --purge remove

依存関係を修復する(fix broken)

apt-get -f install

キャッシュを削除する

apt-get clean

パッケージを削除する

apt-get remove
apt-get --purge remove
dpkg --purge

debconfでパッケージを再設定する

dpkg-reconfigure

一括処理

dpkg --get-selections > dpkg.select
dpkg --set-selections < dpkg.select
debconf-get-selections > debconf.select
debconf-set-selections < debconf.select

*1:names only

*2:設定ファイルを探す