R.A. Epigonos et al.

[aptitude] 推奨パッケージ自動的にインストールされた理由をwhyオプションで調べる。

多くのパッケージをインストールしすぎて、ディスクに空き容量が無くなってしまったので、これを解決するためにいくつかのパッケージを削除する必要が出てきた。こんなときは、aptitudeを使って必要の無いパッケージを確認しつつ削除する。このとき、芋づる式にインストールされたパッケージ(推奨パッケージ)がどのパッケージに必要とされているのかという情報をaptitude whyで確認できる。

例えばXを動かさないはずのサーバにxtermがインストールされていた。これがインストールされた理由をaptitude whyで確認すると以下のようになる。つまり、r-baseパッケージをインストールした際にRecommendsとして導入されたことがわかる。

# aptitude why xterm
i   r-base      Depends    r-base-core (>= 2.11.1-6)
i A r-base-core Depends    tk8.5 (>= 8.5.0)
i A tk8.5       Recommends xterm | x-terminal-emulator

Xのターミナルエミュレータを使うことは殆ど無いので、これを削除してもいいと判断する。xtermを必要としているパッケージを削除して、再度Recommendsパッケージ無しで再インストールすることで、可能な限り環境を維持してディスクスペースを確保してみる。

以下のようにしてr-baseを削除。purgeよりもremoveのほうが安全だったと思う。88MBのディスクスペースが確保された。

# aptitude purge r-base
The following packages will be REMOVED:
  dpatch{u} gfortran{u} gfortran-4.4{u} libblas-dev{u} libblas3gf{u} libbz2-dev{u} libgfortran3{u} libjpeg62-dev{u} liblapack-dev{u} liblapack3gf{u} libpcre3-dev{u}
  libpcrecpp0{u} libutempter0{u} libxss1{u} patchutils{u} r-base{p} r-base-core{u} r-base-dev{u} r-base-html{u} r-cran-boot{u} r-cran-class{u} r-cran-cluster{u}
  r-cran-codetools{u} r-cran-foreign{u} r-cran-kernsmooth{u} r-cran-lattice{u} r-cran-mass{u} r-cran-matrix{u} r-cran-mgcv{u} r-cran-nlme{u} r-cran-nnet{u}
  r-cran-rpart{u} r-cran-spatial{u} r-cran-survival{u} r-doc-html{u} r-recommended{u} tcl8.5{u} tk8.5{u} x11-xserver-utils{u} xbitmaps{u} xdg-utils{u} xterm{u}
0 packages upgraded, 0 newly installed, 42 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 88.0 MB will be freed.
Do you want to continue? [Y/n/?] Y
(Reading database ... 72076 files and directories currently installed.)
Removing r-base-dev ...
Removing dpatch ...
Removing gfortran ...
Removing gfortran-4.4 ...
Removing liblapack-dev ...
Removing libblas-dev ...
Processing triggers for man-db ...
(Reading database ... 71996 files and directories currently installed.)
Removing r-base ...
(Reading database ... 71992 files and directories currently installed.)
Removing r-recommended ...
Removing r-cran-mgcv ...
Removing r-cran-matrix ...
Removing r-cran-rpart ...
Removing r-cran-survival ...
Removing r-cran-spatial ...
Removing r-cran-nnet ...
Removing r-cran-class ...
Removing r-cran-kernsmooth ...
Removing r-cran-mass ...
Removing r-base-html ...
Removing r-cran-nlme ...
Removing r-cran-lattice ...
Removing r-cran-foreign ...
Removing r-cran-codetools ...
Removing r-cran-cluster ...
Removing r-cran-boot ...
Removing r-base-core ...
Removing liblapack3gf ...
Removing libblas3gf ...
Removing libbz2-dev ...
Removing libgfortran3 ...
Removing libjpeg62-dev ...
Removing libpcre3-dev ...
Removing libpcrecpp0 ...
Removing xterm ...
Removing libutempter0 ...
Removing tk8.5 ...
Removing libxss1 ...
Removing patchutils ...
Removing r-doc-html ...
Removing tcl8.5 ...
Removing x11-xserver-utils ...
Removing xbitmaps ...
Removing xdg-utils ...
Processing triggers for man-db ...
Processing triggers for install-info ...

r-baseの再インストール。ただしこのとき--without-recommendsまたは-Rをつけて推奨パッケージをインストールしないようにする。60.3MBのディスクスペースが使用された。88.0MB-60.3MBということで、18MB程度のディスクスペースが確保できたことになる。

# aptitude --without-recommends install r-base
The following NEW packages will be installed:
  libblas3gf{a} libgfortran3{a} liblapack3gf{a} libxss1{a} r-base r-base-core{a} r-cran-boot{a} r-cran-class{a} r-cran-cluster{a} r-cran-codetools{a}
  r-cran-foreign{a} r-cran-kernsmooth{a} r-cran-lattice{a} r-cran-mass{a} r-cran-matrix{a} r-cran-mgcv{a} r-cran-nlme{a} r-cran-nnet{a} r-cran-rpart{a}
  r-cran-spatial{a} r-cran-survival{a} r-recommended{a} tcl8.5{a} tk8.5{a} xdg-utils{a}
The following packages are RECOMMENDED but will NOT be installed:
  aterm aterm-ml eterm evilvte gnome-terminal guake konsole kterm lxterminal mlterm mlterm-tiny mrxvt mrxvt-cjk mrxvt-mini pterm r-base-dev r-base-html r-doc-html
  roxterm rxvt rxvt-beta rxvt-ml rxvt-unicode rxvt-unicode-lite rxvt-unicode-ml sakura terminal.app terminator tilda vala-terminal wterm wterm-ml x11-xserver-utils
  xfce4-terminal xterm xvt
0 packages upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.6 MB of archives. After unpacking 60.3 MB will be used.
Do you want to continue? [Y/n/?] y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main libgfortran3 i386 4.4.5-8 [238 kB]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main libblas3gf i386 1.2-8 [211 kB]
Get:3 http://ftp.jp.debian.org/debian/ squeeze/main liblapack3gf i386 3.2.1-8 [3,098 kB]
Get:4 http://ftp.jp.debian.org/debian/ squeeze/main libxss1 i386 1:1.2.0-2 [13.3 kB]
Get:5 http://ftp.jp.debian.org/debian/ squeeze/main xdg-utils all 1.0.2+cvs20100307-2 [65.8 kB]
Get:6 http://ftp.jp.debian.org/debian/ squeeze/main tcl8.5 i386 8.5.8-2 [1,563 kB]
Get:7 http://ftp.jp.debian.org/debian/ squeeze/main tk8.5 i386 8.5.8-1 [1,118 kB]
Get:8 http://ftp.jp.debian.org/debian/ squeeze/main r-base-core i386 2.11.1-6 [13.6 MB]
Get:9 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-boot all 1.2.42-1 [440 kB]
Get:10 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-cluster i386 1.13.1-1 [359 kB]
Get:11 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-foreign i386 0.8.40-1 [160 kB]
Get:12 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-mass i386 7.3-7-1 [822 kB]
Get:13 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-kernsmooth i386 2.23-3-2 [58.3 kB]
Get:14 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-lattice i386 0.18-8-1 [670 kB]
Get:15 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-nlme i386 3.1.96-1 [1,551 kB]
Get:16 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-matrix i386 0.999375-43-1 [2,991 kB]
Get:17 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-mgcv i386 1.6-2-1 [696 kB]
Get:18 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-survival i386 2.35-8-1 [2,437 kB]
Get:19 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-rpart i386 3.1.46-1 [159 kB]
Get:20 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-class i386 7.3-2-2 [66.4 kB]
Get:21 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-nnet i386 7.3-1-1 [59.3 kB]
Get:22 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-spatial i386 7.3-2-1 [97.0 kB]
Get:23 http://ftp.jp.debian.org/debian/ squeeze/main r-cran-codetools all 0.2-2-2 [41.3 kB]
Get:24 http://ftp.jp.debian.org/debian/ squeeze/main r-recommended all 2.11.1-6 [2,678 B]
Get:25 http://ftp.jp.debian.org/debian/ squeeze/main r-base all 2.11.1-6 [34.2 kB]
Fetched 30.6 MB in 5s (5,559 kB/s)
Preconfiguring packages ...
Selecting previously deselected package libgfortran3.
(Reading database ... 69394 files and directories currently installed.)
Unpacking libgfortran3 (from .../libgfortran3_4.4.5-8_i386.deb) ...
Selecting previously deselected package libblas3gf.
Unpacking libblas3gf (from .../libblas3gf_1.2-8_i386.deb) ...
Selecting previously deselected package liblapack3gf.
Unpacking liblapack3gf (from .../liblapack3gf_3.2.1-8_i386.deb) ...
Selecting previously deselected package libxss1.
Unpacking libxss1 (from .../libxss1_1%3a1.2.0-2_i386.deb) ...
Selecting previously deselected package xdg-utils.
Unpacking xdg-utils (from .../xdg-utils_1.0.2+cvs20100307-2_all.deb) ...
Selecting previously deselected package tcl8.5.
Unpacking tcl8.5 (from .../tcl8.5_8.5.8-2_i386.deb) ...
Selecting previously deselected package tk8.5.
Unpacking tk8.5 (from .../tk8.5_8.5.8-1_i386.deb) ...
Selecting previously deselected package r-base-core.
Unpacking r-base-core (from .../r-base-core_2.11.1-6_i386.deb) ...
Selecting previously deselected package r-cran-boot.
Unpacking r-cran-boot (from .../r-cran-boot_1.2.42-1_all.deb) ...
Selecting previously deselected package r-cran-cluster.
Unpacking r-cran-cluster (from .../r-cran-cluster_1.13.1-1_i386.deb) ...
Selecting previously deselected package r-cran-foreign.
Unpacking r-cran-foreign (from .../r-cran-foreign_0.8.40-1_i386.deb) ...
Selecting previously deselected package r-cran-mass.
Unpacking r-cran-mass (from .../r-cran-mass_7.3-7-1_i386.deb) ...
Selecting previously deselected package r-cran-kernsmooth.
Unpacking r-cran-kernsmooth (from .../r-cran-kernsmooth_2.23-3-2_i386.deb) ...
Selecting previously deselected package r-cran-lattice.
Unpacking r-cran-lattice (from .../r-cran-lattice_0.18-8-1_i386.deb) ...
Selecting previously deselected package r-cran-nlme.
Unpacking r-cran-nlme (from .../r-cran-nlme_3.1.96-1_i386.deb) ...
Selecting previously deselected package r-cran-matrix.
Unpacking r-cran-matrix (from .../r-cran-matrix_0.999375-43-1_i386.deb) ...
Selecting previously deselected package r-cran-mgcv.
Unpacking r-cran-mgcv (from .../r-cran-mgcv_1.6-2-1_i386.deb) ...
Selecting previously deselected package r-cran-survival.
Unpacking r-cran-survival (from .../r-cran-survival_2.35-8-1_i386.deb) ...
Selecting previously deselected package r-cran-rpart.
Unpacking r-cran-rpart (from .../r-cran-rpart_3.1.46-1_i386.deb) ...
Selecting previously deselected package r-cran-class.
Unpacking r-cran-class (from .../r-cran-class_7.3-2-2_i386.deb) ...
Selecting previously deselected package r-cran-nnet.
Unpacking r-cran-nnet (from .../r-cran-nnet_7.3-1-1_i386.deb) ...
Selecting previously deselected package r-cran-spatial.
Unpacking r-cran-spatial (from .../r-cran-spatial_7.3-2-1_i386.deb) ...
Selecting previously deselected package r-cran-codetools.
Unpacking r-cran-codetools (from .../r-cran-codetools_0.2-2-2_all.deb) ...
Selecting previously deselected package r-recommended.
Unpacking r-recommended (from .../r-recommended_2.11.1-6_all.deb) ...
Selecting previously deselected package r-base.
Unpacking r-base (from .../r-base_2.11.1-6_all.deb) ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up libgfortran3 (4.4.5-8) ...
Setting up libblas3gf (1.2-8) ...
update-alternatives: using /usr/lib/libblas/libblas.so.3gf to provide /usr/lib/libblas.so.3gf (libblas.so.3gf) in auto mode.
Setting up liblapack3gf (3.2.1-8) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/lapack/liblapack.so.3gf because link group liblapack.so.3gf is broken.
Setting up libxss1 (1:1.2.0-2) ...
Setting up xdg-utils (1.0.2+cvs20100307-2) ...
Setting up tcl8.5 (8.5.8-2) ...
Setting up tk8.5 (8.5.8-1) ...
update-alternatives: using /usr/bin/wish8.5 to provide /usr/bin/wish (wish) in auto mode.
Setting up r-base-core (2.11.1-6) ...
Setting R_PAPERSIZE_USER default to 'letter'

Creating config file /etc/R/Renviron with new version
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
mktexlsr: Done.
Setting up r-cran-boot (1.2.42-1) ...
Setting up r-cran-cluster (1.13.1-1) ...
Setting up r-cran-foreign (0.8.40-1) ...
Setting up r-cran-mass (7.3-7-1) ...
Setting up r-cran-kernsmooth (2.23-3-2) ...
Setting up r-cran-lattice (0.18-8-1) ...
Setting up r-cran-nlme (3.1.96-1) ...
Setting up r-cran-matrix (0.999375-43-1) ...
Setting up r-cran-mgcv (1.6-2-1) ...
Setting up r-cran-survival (2.35-8-1) ...
Setting up r-cran-rpart (3.1.46-1) ...
Setting up r-cran-class (7.3-2-2) ...
Setting up r-cran-nnet (7.3-1-1) ...
Setting up r-cran-spatial (7.3-2-1) ...
Setting up r-cran-codetools (0.2-2-2) ...
Setting up r-recommended (2.11.1-6) ...
Setting up r-base (2.11.1-6) ...

リファレンス

  1. Debian パッケージ管理
  2. 第2章 Debian パッケージ管理
  3. Debianリファレンス
  4. "aptitude why" - Google 検索
  5. D: AptGet - Debian GNU/Linux スレッドテンプレ
  6. "aptitude --without-recommend"|"aptitude -R" - Google 検索

ソーシャルブックマーク

  1. はてなブックマーク
  2. Google Bookmarks
  3. del.icio.us

ChangeLog

  1. Posted: 2010-01-17T08:47:15+09:00
  2. Modified: 2010-01-17T08:47:15+09:00
  3. Generated: 2023-08-27T23:09:15+09:00