# Packages and dependencies



## Speedy (Jul 14, 2016)

I do not want to resurrect this old thread https://forums.freebsd.org/threads/16963/ ... but I have the same question.
When I troubleshoot in Gentoo I execute `emerge --oneshot foo` and the package will not be registered as installed by user and can be cleaned out by `emerge --depclean` when the package that pulled it in is removed.
What exactly happens in FreeBSD if I rebuild a dependency by hand?


----------



## ANOKNUSA (Jul 14, 2016)

You can change the installation status to "automatic" with pkg-set(8). What port did you have in mind, though? It might be more worthwhile to figure out why a dependency might need to be explicitly rebuilt, and try to avoid it altogether.


----------

