Hi everyone, I just released cargo-cache 0.6.1!
Cargo cache is a small tool to keep the otherwise ever-growing download cache of cargo in check. (The $CARGO_HOME where cargo downloads sources before building a crate.)
It shows the size, prints statistics and has different strategies to clean selected parts of the download cache.
There was a bug reported hours after the 6.0.0 release so I quickly made a point-release.
Changes include:
A more detailed summary when parts of the cache are cleaned:
If you run cargo cache --autoclean for example, you'll now get a more detailed summary:
Total: 3.38 GB => 3.28 GB
62 installed binaries: 665.64 MB
Registry: 2.03 GB => 2.00 GB
2 registry indices: 444.25 MB
10570 crate archives: 1.55 GB
96 => 0 crate source checkouts: 34.81 MB => 0 B
Git db: 685.13 MB => 619.64 MB
114 bare git repos: 619.64 MB
7 => 0 git repo checkouts: 65.48 MB => 0 B
Size changed 3.38 GB => 3.28 GB (-100.29 MB, -2.96%)
Print a more descriptive error when "git" is not present (while using --gc or --fsck).
The sccache subcommand should find the correct cache directory on windows.
The clean-unref subcommand prints the same stats as --autoclean.
A trim subcommand was added to reduce the cache sizes down to a --limited size.
A toolchain subcommand shows sizes of toolchains that were installed via rustup:
Toolchain Name Files Size Percentage
beta-x86_64-unknown-linux-gnu 23507 1.77 GB 21.75 %
nightly-x86_64-unknown-linux-gnu 23570 1.75 GB 21.51 %
nightly-2021-01-15-x86_64-unknown-linux-gnu 23536 1.69 GB 20.68 %
stable-x86_64-unknown-linux-gnu 19097 1.63 GB 20.02 %
master 3843 1.31 GB 16.04 %
Total 93553 8.16 GB 100 %
Links:
cargo-cache on crates.io
cargo-cache on github
changelog on github