LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-17-2005, 06:44 PM   #1
JetJock
LQ Newbie
 
Registered: Jun 2005
Location: USA
Distribution: Debian Sarge
Posts: 9

Rep: Reputation: 0
Question apt not removing dependencies


Happened to notice that apt isn't removing dependencies correctly.

Wanted to run deborphan, so I did an apt-get install deborphan. It said it also wanted to install dialog as a dependency. Fine, so I let it install both of them. No problems.

Ran deborphan, looked at the results, and then didn't need it anymore so I did an apt-get --purge remove deborphan. Well, it removed deborphan fine, but dialog is still there. There was nothing else that depended on dialog before I installed deborphan (it wasn't already installed prior to this), and now that deborphan is gone, how come it didn't remove dialog as well, as there is nothing else depending on it.

I thought apt handled dependencies better than this. This seems like one really fast way to crud up your system with lots of unnecessary leftovers real quick.

What am I missing here ? Is something messed up with my dependency tree ? Maybe someone could try this out and let me know what you get.
 
Old 06-17-2005, 07:08 PM   #2
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Rep: Reputation: 62
I use deborphan regularly, don't remember ever using dialog. Maybe 'dialog' is a complimentary package and not a dependency. Try:

# dpkg -P dialog
# apt-get clean

After you're thru, read the configuration sticky at the top of the page. It will answer other questions.

Last edited by macondo; 06-17-2005 at 07:10 PM.
 
Old 06-17-2005, 07:10 PM   #3
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Rep: Reputation: 48
that's what deborphan is for, not to crud up your system I don't know about dialog though. here something handy for future references
[code]
deborphan|xargs apt-get -y remove --purge
[\code]
that will remove everything deborphan finds. Sorry I couldn't be of more help
 
Old 06-17-2005, 07:23 PM   #4
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,886
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
Is it safe to remove everything deborphan finds?
 
Old 06-17-2005, 07:32 PM   #5
JetJock
LQ Newbie
 
Registered: Jun 2005
Location: USA
Distribution: Debian Sarge
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the replies. I probably used a bad example with deborphan, because as was said, its purpose is to help keep your system crud-free , and actually my problem is much more general than just with deborphan.

Let me restate my problem in perhaps a better way. When I install program "X" using apt-get, and it also wants to install some dependencies "Y" that I don't already have, and after I do the installation, if I turn around and immediately do an apt-get remove, it will only remove "X", and not "Y", even though nothing else is depending on "Y". What's up with that ?

I just used deborphan as an example, because it was simple, and it only wanted to install one dependency that I didn't already have on my system.
 
Old 06-17-2005, 08:12 PM   #6
JetJock
LQ Newbie
 
Registered: Jun 2005
Location: USA
Distribution: Debian Sarge
Posts: 9

Original Poster
Rep: Reputation: 0
Figured it out. Partly a problem with me, and partly a problem with how apt handles dependencies when you remove a package.

My problem was how I interpreted this line from the apt documentation: "APT also takes care of removing packages which depend on the package you have asked to remove. There is no way to remove a package using APT without also removing those packages that depend on it."

Once I understood that, I went back to my example and did an apt-get remove dialog first, and then it would remove both dialog and deborphan automatically, even though my original install was only of deborphan.

But, this also brings up a bigger question. Are there some package utilities out there that handle the dependencies of removing packages better ? The way apt works, it's necessary to know the highest level dependency in order to completely undo a package install. Otherwise, simply doing apt-get install "X", which then also installs "Y" dependencies (which is excellent by the way, yea Debian), will leave you hanging with a bunch of possibly unused packages when you go back and apt-get remove "X", as it doesn't know if it's the only user of the "Y"s, and doesn't remove them, like in my first post.
 
Old 06-17-2005, 09:00 PM   #7
ToastedToad
Member
 
Registered: Feb 2005
Location: Sequim,WA
Distribution: Debian_sid/Debian_sarge_amd64
Posts: 157

Rep: Reputation: 30
http://ubuntuforums.org/showthread.php?t=37736

Found this thread. Haven't used aptitude much, but it may be what you are looking for.
 
Old 06-17-2005, 09:02 PM   #8
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Rep: Reputation: 48
I don't know why apt does that. Deborphan, and orphaner will clean up all packages that aren't needed anymore. Yes, it is completely safe(as far as I know) to remove everything deborphan finds
 
Old 06-17-2005, 10:14 PM   #9
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
Quote:
Yes, it is completely safe(as far as I know) to remove everything deborphan finds
Depends on your definition of safe. If you have 3rd party software installed you may end up removing something they depend on. For example, I have the Citrix ICA client installed on my machine which uses libxaw7 but the package manager has no idea about that relationship.
 
Old 06-17-2005, 10:16 PM   #10
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,886
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
deborphan says I don't need the win32codecs, guess kaffeine will have to find the codecs somewhere else.

I did remove about 6 other lib files and everything seems to be working just fine.
 
Old 06-17-2005, 11:45 PM   #11
JetJock
LQ Newbie
 
Registered: Jun 2005
Location: USA
Distribution: Debian Sarge
Posts: 9

Original Poster
Rep: Reputation: 0
ToastedToad,

Now THAT rocks! Thanks for that thread post. Aptitude is where I'm headed....

After reading more in this forum and elsewhere about Aptitude, I like its features a bunch. For those interested, see this also, reference a link in an earlier post by Dead Parrot:

Aptitude seven reasons why
 
Old 06-18-2005, 02:09 AM   #12
ToastedToad
Member
 
Registered: Feb 2005
Location: Sequim,WA
Distribution: Debian_sid/Debian_sarge_amd64
Posts: 157

Rep: Reputation: 30
Hey no problem JetJock.
 
  


Reply



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
Removing unneeded old dependencies pulsez Fedora 5 09-16-2005 01:18 AM
removing package with unmet dependencies in Sarge killy9999 Debian 6 09-08-2005 12:42 PM
apt-get: don't resolve dependencies? merchtemeagle Debian 7 06-17-2005 02:11 PM
how do I "apt-get install" without removing dependencies? suse2166 Linux - Software 4 12-26-2004 07:41 PM
apt doesn't fix all dependencies :(? darkleaf Debian 4 07-25-2004 04:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:04 PM.

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
Open Source Consulting | Domain Registration