Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo update removes uninstalled deps from target/, when detected they have been removed from Cargo.toml #6435

Open
ThatNerdyPikachu opened this issue Dec 13, 2018 · 3 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-clean Command-update S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@ThatNerdyPikachu
Copy link

Describe the problem you are trying to solve

I get quite annoyed of having to clear my target folder and rebuild everytime this happens, and I don't feel like digging through target/ in search for my package.

Describe the solution you'd like

An extension to cargo update (maybe even a seperate command) that removes unused packages from target/.

@alexcrichton alexcrichton added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Dec 14, 2018
@dwijnand
Copy link
Member

This sounds a bit like --prune in git fetch.

@Eh2406
Copy link
Contributor

Eh2406 commented Dec 20, 2018

This is a great example of #6229. The current discussion there is that we want to explore the possibilities in out of tree cargo commands and incorporate them into cargo as we see adoption. I and @holmgr are both planning on making progress on this before the end of the year. But the form that progress will take is still in flux. Probably the best discussion is happening at holmgr/cargo-sweep#2.

@epage
Copy link
Contributor

epage commented Oct 25, 2023

A garbage collector is being worked on. The tracking issue is #12633. It is first starting with global resources and then we'll be looking at the target directory.

@epage epage added the S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-clean Command-update S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

5 participants