apt-get メモ

ubuntu のパッケージ管理は慣れていないので、すぐ忘れちゃうのでとりあえずメモ。

確認後にインストールするオプションみたいなのは、どれですかね?-u とか、-s とか?

コマンド 内容
apt-get install [package] パッケージのインストール/更新
apt-get update パッケージリストの更新
apt-get upgrade インストールされてるパッケージの更新
apt-get dist-upgrade インストールされてるパッケージの更新/ディストリビューションの更新
dpkg -l [package] インストールされてるパッケージの一覧
dpkg -L インストールした時のファイルの一覧
apt-cache search [query] パッケージの検索
apt-get remove [package] パッケージの削除
apt-get autoremove 使ってないパッケージの削除
apt-get purge [package] パッケージの削除(設定ファイルも)
apt-get clean アーカイブファイルの削除
apt-get clean 使ってないパッケージのアーカイブファイルの削除

参考

[Ubuntu] apt-get まとめ
http://qiita.com/white_aspara25/items/723ae4ebf0bfefe2115c

▼オプション

-d パッケージのダウンロードのみを行います。展開・インストールは行いません。
-f パッケージの依存性がおかしくなった場合、その修復を試みます。
-q quietモードです。進捗状況を表示しません。
-u アップデートするパッケージの一覧を表示します。
-s なにが起こるのかのシミュレーションを行い、実際にはシステムの変更を行わない。
-y インタラクティブ(ユーザーへの問い合わせ)に「yes」と答えます。

参考

apt-get – パッケージの操作・管理 – Linuxコマンド
http://webkaru.net/linux/apt-get-command/

Ubuntu Manpage_ apt-get

http://manpages.ubuntu.com/manpages/lucid/ja/man8/apt-get.8.html

 

apt-get upgrade のとき何が起きるのか不明で確認したかったので、-s でシュミレーション。

以下のようになった。とりあえず、これでいいや。

[root@pi ~ 07/26 07:01:35]# apt-get upgrade -s
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  bind9-host cups-bsd cups-client cups-common fuse libbind9-80 libcups2 libcupsimage2 libdns88 libfuse2 libisc84 libisccc80 libisccfg82 liblwres80
  libsdl1.2debian libsqlite3-0 libssl1.0.0 openssl
18 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst libssl1.0.0 [1.0.1e-2+rvt+deb7u16] (1.0.1e-2+rvt+deb7u17 Raspbian:7.0/oldstable [armhf])
Inst libsqlite3-0 [3.7.13-1+deb7u1] (3.7.13-1+deb7u2 Raspbian:7.0/oldstable [armhf])
Inst libcupsimage2 [1.5.3-5+deb7u5] (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [armhf]) []
Inst cups-common [1.5.3-5+deb7u5] (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [all]) []
Inst cups-bsd [1.5.3-5+deb7u5] (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [armhf]) []
Inst cups-client [1.5.3-5+deb7u5] (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [armhf]) []
Inst libcups2 [1.5.3-5+deb7u5] (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [armhf])
Inst fuse [2.9.0-2+deb7u1] (2.9.0-2+deb7u2 Raspbian:7.0/oldstable [armhf]) []
Inst libfuse2 [2.9.0-2+deb7u1] (2.9.0-2+deb7u2 Raspbian:7.0/oldstable [armhf])
Inst libsdl1.2debian [1.2.15-5] (1.2.15-5+rpi1 Raspberry Pi Foundation:oldstable [armhf])
Inst bind9-host [1:9.8.4.dfsg.P1-6+nmu2+deb7u4] (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf]) []
Inst libisc84 [1:9.8.4.dfsg.P1-6+nmu2+deb7u4] (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf]) []
Inst libdns88 [1:9.8.4.dfsg.P1-6+nmu2+deb7u4] (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf]) []
Inst libisccc80 [1:9.8.4.dfsg.P1-6+nmu2+deb7u4] (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf]) []
Inst libisccfg82 [1:9.8.4.dfsg.P1-6+nmu2+deb7u4] (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf]) []
Inst libbind9-80 [1:9.8.4.dfsg.P1-6+nmu2+deb7u4] (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf]) []
Inst liblwres80 [1:9.8.4.dfsg.P1-6+nmu2+deb7u4] (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf])
Inst openssl [1.0.1e-2+rvt+deb7u16] (1.0.1e-2+rvt+deb7u17 Raspbian:7.0/oldstable [armhf])
Conf libssl1.0.0 (1.0.1e-2+rvt+deb7u17 Raspbian:7.0/oldstable [armhf])
Conf libsqlite3-0 (3.7.13-1+deb7u2 Raspbian:7.0/oldstable [armhf])
Conf libcups2 (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [armhf])
Conf libcupsimage2 (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [armhf])
Conf cups-common (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [all])
Conf cups-client (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [armhf])
Conf cups-bsd (1.5.3-5+deb7u6 Raspbian:7.0/oldstable [armhf])
Conf libfuse2 (2.9.0-2+deb7u2 Raspbian:7.0/oldstable [armhf])
Conf fuse (2.9.0-2+deb7u2 Raspbian:7.0/oldstable [armhf])
Conf libsdl1.2debian (1.2.15-5+rpi1 Raspberry Pi Foundation:oldstable [armhf])
Conf libisc84 (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf])
Conf libdns88 (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf])
Conf libisccc80 (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf])
Conf libisccfg82 (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf])
Conf libbind9-80 (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf])
Conf liblwres80 (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf])
Conf bind9-host (1:9.8.4.dfsg.P1-6+nmu2+deb7u5 Raspbian:7.0/oldstable [armhf])
Conf openssl (1.0.1e-2+rvt+deb7u17 Raspbian:7.0/oldstable [armhf])
[root@pi ~ 07/26 07:02:12]#