LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 12-27-2008, 08:49 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
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?

Thanks
 
Old 12-27-2008, 08:55 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,590

Rep: Reputation: 187Reputation: 187
I use orphaner to find and delete packages which are not related to anything useful. See:

man orphaner

-----------------------
Steve Stites
 
Old 12-27-2008, 09:15 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by jailbait View Post
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.
 
Old 12-27-2008, 09:24 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,590

Rep: Reputation: 187Reputation: 187
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

Last edited by jailbait; 12-27-2008 at 09:25 PM.
 
Old 12-27-2008, 09:38 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by jailbait View Post
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?

There is gotta be some way to do that.

Thank you once again for your effort.
 
Old 12-28-2008, 01:35 AM   #6
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 457Reputation: 457Reputation: 457Reputation: 457Reputation: 457
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.
 
Old 12-28-2008, 09:00 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by craigevil View Post
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.
 
Old 12-28-2008, 11:04 PM   #8
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 457Reputation: 457Reputation: 457Reputation: 457Reputation: 457
aptitude may be able to do that:
http://algebraicthunk.net/~dburrows/...TermQuickGuide

Its really not that big a deal unless you are short on drive space.
 
Old 12-28-2008, 11:09 PM   #9
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by craigevil View Post
I will look into that...

Quote:
Originally Posted by craigevil View Post
Its really not that big a deal unless you are short on drive space.
Yes, I am trying to make a minimal debian system for a small embedded device. So space is gold for me...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"hotplug" package in Lenny? virve Debian 1 10-10-2008 12:12 PM
perl install error: Can't locate object method "new" via package "Module::Build::Vers powah Linux - Software 0 10-24-2006 02:57 PM
sudo apt-get install acroread returns "Couldn't find package acroread" swiadek Ubuntu 3 02-13-2006 11:52 AM
how to install the "packages that have been held back" when doing "apt-get upgrade&qu zero79 Debian 5 06-27-2004 09:19 PM
apt-get install "package" mikeshn Linux - Software 6 05-30-2003 11:29 AM


All times are GMT -5. The time now is 07:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration