pipdeptree
pipdeptree copied to clipboard
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.
![截屏2020-12-24 上午9 34 24](https://user-images.githubusercontent.com/38179369/103048941-37b1aa00-45cb-11eb-9f2c-788e377c9e38.png)
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