apt-get "recommends" package install question in Lenny
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
apt-get "recommends" package install question in Lenny
It looks like the new version of apt-get in current Lenny installs recommended packages by default. For example, when I did this:
Code:
apt-get install gcc-4.3
it showed me:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
cpp-4.3 libc6-dev libgmp3c2 libgomp1 libmpfr1ldbl linux-libc-dev
Suggested packages:
gcc-4.3-locales gcc-4.3-multilib libmudflap0-4.3-dev gcc-4.3-doc libgcc1-dbg libgomp1-dbg libmudflap0-dbg glibc-doc manpages-dev
The following NEW packages will be installed:
cpp-4.3 gcc-4.3 libc6-dev libgmp3c2 libgomp1 libmpfr1ldbl linux-libc-dev
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.5MB of archives.
After this operation, 30.7MB of additional disk space will be used.
Do you want to continue [Y/n]? y
As you can see the package in red, libc6-dev, is just a recommended package and not a pure dependency as per here.
Now since I had specific knowledge about this package I could detect that libc6-dev was not a dependency package, so I can remove it manually by apt-get remove libc6-dev.
For future I can take care of this by passing the argument as per apt-get man page:
Code:
--no-install-recommends
Do not consider recommended packages as a dependency for installing. Configuration Item: APT::Install-Recommends.
However, my question is that apt-get must have installed other recommended packages also without my knowledge. So how can I detect those packages in my system and remove them?
I use orphaner to find and delete packages which are not related to anything useful. See:
man orphaner
-----------------------
Steve Stites
Steve thank you for your response and time. Actually I have used orphaner before and for some reasons it does not detect the libc6-dev package in this case. So for example, I did this:
Removed the gcc-4.3 package first:
Code:
debian:~# apt-get remove gcc-4.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libgomp1 linux-libc-dev libgmp3c2 libmpfr1ldbl libc6-dev cpp-4.3
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
gcc-4.3
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 4665kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 14844 files and directories currently installed.)
Removing gcc-4.3 ...
debian:~# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libgomp1 linux-libc-dev libgmp3c2 libmpfr1ldbl libc6-dev cpp-4.3
The following packages will be REMOVED:
cpp-4.3 libc6-dev libgmp3c2 libgomp1 libmpfr1ldbl linux-libc-dev
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
After this operation, 26.0MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 14781 files and directories currently installed.)
Removing cpp-4.3 ...
Removing libc6-dev ...
Removing libmpfr1ldbl ...
Removing libgmp3c2 ...
Removing libgomp1 ...
Removing linux-libc-dev ...
Processing triggers for man-db ...
debian:~#
Installed it again:
Code:
debian:~# apt-get install gcc-4.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
cpp-4.3 libc6-dev libgmp3c2 libgomp1 libmpfr1ldbl linux-libc-dev
Suggested packages:
gcc-4.3-locales gcc-4.3-multilib libmudflap0-4.3-dev gcc-4.3-doc libgcc1-dbg libgomp1-dbg libmudflap0-dbg glibc-doc manpages-dev
The following NEW packages will be installed:
cpp-4.3 gcc-4.3 libc6-dev libgmp3c2 libgomp1 libmpfr1ldbl linux-libc-dev
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/10.5MB of archives.
After this operation, 30.7MB of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously deselected package libgmp3c2.
(Reading database ... 13636 files and directories currently installed.)
Unpacking libgmp3c2 (from .../libgmp3c2_2%3a4.2.2+dfsg-3_i386.deb) ...
Selecting previously deselected package libmpfr1ldbl.
Unpacking libmpfr1ldbl (from .../libmpfr1ldbl_2.3.1.dfsg.1-2_i386.deb) ...
Selecting previously deselected package cpp-4.3.
Unpacking cpp-4.3 (from .../cpp-4.3_4.3.2-1_i386.deb) ...
Selecting previously deselected package libgomp1.
Unpacking libgomp1 (from .../libgomp1_4.3.2-1_i386.deb) ...
Selecting previously deselected package gcc-4.3.
Unpacking gcc-4.3 (from .../gcc-4.3_4.3.2-1_i386.deb) ...
Selecting previously deselected package linux-libc-dev.
Unpacking linux-libc-dev (from .../linux-libc-dev_2.6.26-12_i386.deb) ...
Selecting previously deselected package libc6-dev.
Unpacking libc6-dev (from .../libc6-dev_2.7-16_i386.deb) ...
Processing triggers for man-db ...
Setting up libgmp3c2 (2:4.2.2+dfsg-3) ...
Setting up libmpfr1ldbl (2.3.1.dfsg.1-2) ...
Setting up cpp-4.3 (4.3.2-1) ...
Setting up libgomp1 (4.3.2-1) ...
Setting up gcc-4.3 (4.3.2-1) ...
Setting up linux-libc-dev (2.6.26-12) ...
Setting up libc6-dev (2.7-16) ...
debian:~#
Now libc6-dev gets installed again which is fine. Now when I give orphaner it does not detect libc6-dev package:
Code:
debian:~# orphaner
No orphaned package found
My understanding is that orphaner will only find out libc6-dev if we uninstall gcc-4.3. Then technically libc6-dev *now* is a orphaned package.
I am looking for all the packages that I can potentially remove (recommended ones like libc6-dev) from my system. I am trying to make it as lean as possible.
OK, here's my second try. Run synaptic. Click on Settings -> Preferences -> General and untick the box labeled "Consider recommended packages as dependencies".
Apply and OK. Maybe that will work.
OK, here's my second try. Run synaptic. Click on Settings -> Preferences -> General and untick the box labeled "Consider recommended packages as dependencies".
Apply and OK. Maybe that will work.
-------------------
Steve Stites
I wish I could. Installing X is not an option for me. I want to keep the system just console based.
Even by what you suggested I think that will take care of *future* installations, but my question is what about the packages that have been *previously* installed as recommended ones. How can I detect those on my system?
Add the following to your /etc/apt/apt.conf or /etc/apt/
apt.conf.d
// Recommends are as of now still abused in many packages
APT::Install-Recommends "0";
APT::Install-Suggests "0";
Rather than orphaner you might try deborphan and defoster.
Thanks craigevil. I do understand that putting those lines will prevent this from happening in future. Unfortunately this is *not* my question. My question was how can I find out packages which were installed as "recommended" (like libc6-dev) before the above fix was done?
So for example, I only got aware of this problem yesterday and I have been using this system for about 1 week and I installed all my packages using apt-get without the above fix. So I need to take care of (basically purge) those packages before the above fix is implemented i.e. find out all the packages installed as "recommended" and purge them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.