List installed packages that are not dependencies of another installed package.
using homebrew I can simply use brew leaves to show all installed formulae that are not dependencies of another installed formula.
How to do the same thing using pipdeptree?
Something equivalent to this:
pipdeptree --r -a | rg -U "^[^ ].*\n[^ ].*\n" | sed -n "p;n"
There's no direct way to do this. Does the above command work?
Also, what's rg?
rg is ripgrep similar to grep command. It support mutiline search.
If pipdeptree can do this in a direct way, it will be more convenient😊.
pipdeptree is a awsome tool!
Thanks for the kind words :-) It should be quite simple to implement. Curious to understand the use case for this. In what way do you use these leaf packages output?
Sometimes I want to get the specific packages I installed, and I can safely delete the packages listed by leaves.
This sounds like -r combined with https://github.com/tox-dev/pipdeptree/issues/89