# Removing unused dependences.



## Dissident85 (Aug 31, 2009)

Hi all, I was just wondering when I remove a package or a port using the pkg_remove command will it remove all its deprecated dependencies. So for example let's say I installed adesklets and it pulls in python26 and xproto. for this example let's say that python26 is also required by openbox and xproto not needed by any other package. If I run "_pkg_remove adesklets_" will it remove xproto and adesklets and leave prython26? or will it remove all 3 packages? or will it just remove adesklets leaving xproto sitting there doing nothing using up hard disk space, and worst case scenario with some packages use up CPU power and memory?


----------



## graudeejs (Aug 31, 2009)

no, it will only remove 1 package.
install ports-mgmt/pkg_cutleaves
and use it to delete packages, it will ask if you want, and which dependencies you want to remove.....


----------



## Dissident85 (Aug 31, 2009)

killasmurf86 said:
			
		

> no, it will only remove 1 package.
> install ports-mgmt/pkg_cutleaves
> and use it to delete packages, it will ask if you want, and which dependencies you want to remove.....



ok, so it is like the emerge --depclean option in Gentoo Linux? From my experiences with Linux distributions it can be dangerous running  such things. Is there a way to check for broken packages after i execute pkg_cutleaves? or is it rock solid and safe?


----------



## graudeejs (Aug 31, 2009)

FreeBSD != Linux
Linux stupidities doesn't apply to FreeBSD.
On Linux, you could wipe out packages necessary to boot Linux... On FreeBSD that's impossible, because unlike Linux, which is just kernel + other apps (including packaging management), FreeBSD is Kernel+Base system and ports as simply unnecessary to run add-ons.

Ports are completely separate from Base system on FreeBSD..... you can delete them all, and you will still have fully functioning FreeBSD system (with kernel and base utilities).


----------



## Dissident85 (Aug 31, 2009)

killasmurf86 said:
			
		

> FreeBSD != Linux
> Linux stupidities doesn't apply to FreeBSD.
> On linux, you could wipe out packages nessacery to boot Linux... On FreeBSD that's impossible, because unlike Linux, which is just kernel + other apps (including packaging management), FreeBSD is Kernel+Base system and ports as simply unnessacery to run addon's
> 
> Ports are compleatly separate from Base system on FreeBSD..... you can delete them all, and you will still have fully functioning FreeBSD system (with kernel and base utilities)



hahaha, ok... I am just making the move over to FreeBSD from Linux... Well giving it a go because I have heard good things about it. Are there any other common incorrect assumptions that I should be aware of?


----------



## graudeejs (Aug 31, 2009)

Read the handbook, and FAQ.... pretty good things...

Don't assume that base install of FreeBSD will have X.

Linux rocks.... No it doesn't, at least not as much as Linuxists claim

We'll be glad to provide info on how to resolve problems, just remember, that FreeBSD is for people who love reading and are interested in learning.

In the end you'll love it.


----------



## bellchu (Jan 5, 2015)

Super delayed reply......

pkg-autoremove(8)


----------



## junovitch@ (Jan 6, 2015)

Always appreciate a helpful response but I think we can just let this one fade away.  This is a 5 year old thread and pkg(8) didn't even exist at the time.


----------

