Cargo cache 0.5.0 released: new sccache and clean-unref subcommands

I'm proud to announce cargo-cache 0.5.0!

cargo-cache is a program that lets you inspect and manage your local cargo-home, cargos download cache (usually at ~/.cargo/).

There's a new subcommand: cargo cache sc or cargo cache sccache that prints a table of files added per day of a local sccache build cache:

Files  Day         Size       Percentage
1437   2020-07-26  751.63 MB  23.34 %
1729   2020-07-27  747.94 MB  23.22 %
963    2020-07-28  485.72 MB  15.08 %
1698   2020-07-29  997.70 MB  30.98 %
350    2020-07-30  237.70 MB  7.38 %

6177               3.22 GB    100 %

There are no options to modify the cache though (use sccache for that).
(I might add something in the future, I dunno...)

A long-standing feature-request is finally implemented; a new subcommand "clean-unref" (cargo cache clean-unref) to prune the cache of all sources that are not referenced in the dep-tree of the project in the current workspace (or downwards).
By default, cargo-cache will try to find a Cargo.toml on its own, but you can also specify one via --manifest-path.
You can use this to reduce the size of your ${CARGO_HOME} if you want to cache it on CI (such as travis, azure or gha).

Fixed --keep-duplicate-crates handling of crates with alpha/beta etc labels.
Some NixOS related fixes to tests were also pushed.

If there are any bugs, let me know or file an issue on github.

Cheers :slight_smile:

cargo-cache on github
cargo-cache on

edit: I never get the formatting right on the first try lol


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.