I've installed several CLI tools using cargo install (for instance, ripgrep). How do I see a list of all the crates I've downloaded using cargo install? Sort of like apt list --installed but for cargo?
I've installed several CLI tools using cargo install (for instance, ripgrep). How do I see a list of all the crates I've downloaded using cargo install? Sort of like apt list --installed but for cargo?
The command line
cargo help install
produces detailed help information. Among others it lists common EXAMPLES, e.g.
View the list of installed packages:
cargo install --list
ls ~/.cargo/bin/
The binary files are stored here, so listing all the files in this directory will give you all the global cargo crates you've installed.
If you want to manipulate the list shown by cargo install --list, then please check:
cat $CARGO_HOME/bin/.crates.toml
cat $CARGO_HOME/bin/.crates2.json | jq .
Please note that .crates2.json is in json format.