holmgr / cargo-sweep

A cargo subcommand for cleaning up unused build files generated by Cargo
MIT License
693 stars 31 forks source link

Add option for removing binaries and / or "everything" as well #77

Closed bes closed 1 year ago

bes commented 1 year ago

Would you consider adding a new flag for removing the binary and / or a "remove everything" flag?

Sometimes I am out of disk space, and I just want to nuke everything, but since I have several projects going at once, cargo-sweep will leave multiple files behind, some of which are several hundred megabytes (debug builds with debug symbols and sources for iOS).

I think it would be handy with a --nuke option (there's probably a better name....) to just remove everything from the /target folders.

Thanks

jyn514 commented 1 year ago

What would be the difference between this and cargo clean?

Anyway, I think this is the same as https://github.com/holmgr/cargo-sweep/issues/90, which you can emulate today with --recursive --time 0.

bes commented 1 year ago

Yes, this is the same as #90 Difference from cargo clean is that I can run sweep on all my projects instead of one at a time.

bes commented 1 year ago

@jyn514 closed because it seems there is a will in #90 to implement it

Systemcluster commented 1 year ago

I'm using cargo-clean-all for this purpose. It deletes the complete target directory of all projects, including the incremental directory which cargo-sweep doesn't yet (tracked in #50).

jyn514 commented 1 year ago

@Systemcluster how does cargo-clean-all differ from cargo-sweep? if it does everything this project does I wonder if we should just archive the project and point people there 🤔