Removing dependencies?!?!?

If none of the more specific forums is the right place to ask
Post Reply
Message
Author
jsosic
Posts: 16
Joined: 2005-04-03 00:55
Location: Split, Croatia
Contact:

Removing dependencies?!?!?

#1 Post by jsosic »

Hi guys.

I'm running Debian on my router box, and I've encountered one problem. I use Gentoo as my desktop machine, and I'm satisfied with it, but it would be boring to run same distro on second box too...

So, hypotetichally, this is a problem.

Code: Select all

# apt-get install package1
So, that action installs package1, but also package1-dep1, package1-dep2, package1-dep3 and majordep1. "majordep1" is let's say dependency of some other package too, while package1-dep* are deps of package1 only.

So after a while, I realize I really don't need package1.

Code: Select all

# apt-get remove package1
But the dependencies stay installed and waste my diskspace. How to get rid of them? In gentoo, there's emerge --depclean, and what about Debian?

Thank you.

Harold
Posts: 1502
Joined: 2005-01-07 00:15

#2 Post by Harold »

Do apt-get install deborphan, then run orphaner at the console prompt. orphaner will remove those libraries that are not required by any of the applications installed on your computer.

lacek
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#3 Post by lacek »

I don't think there is a tool with you can do it in Debian. You can use the 'deborphan' package to check which libs (and programs) are 'orphaned' (they are packages on which no other ones depend) and purge them.

pigah
Posts: 189
Joined: 2005-03-29 23:20

#4 Post by pigah »

get the package deborphan, then run the command orphaner. It will give you a list of all the libraries that don't depend on otheres. if you run orphaner -a it will also include executables. don't automatically remove all the programs as you may need some.

lacek
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#5 Post by lacek »

Wow, 3 replies came almost simultaneously :-D

jsosic
Posts: 16
Joined: 2005-04-03 00:55
Location: Split, Croatia
Contact:

#6 Post by jsosic »

Well shame that deb package manager can't do that although it has full reverse dependencies support. But, I've noticed that app called "aptitude" can remove dependencies... I've tested it with "synaptic" package, wich on my system has a long list of deps, and it worked quite nicely. So I guess I'm stuck with it...

Post Reply