Skip to content

"pdm sync --clean" does not remove the un-required packages according to the current candidates #398

Answered by frostming
linw1995 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, it is somewhat a hidden feature :P. Because it is a bit annoying to keep in mind which sections are added to installation when doing pdm sync --clean, especially for pdm remove(with pdm sync --clean under the hood) where there is no way to specify which sections to keep.

Say you installed your project with extra1 feature, and after some development, you realize foo is not required anymore. You do this by
pdm remove foo and found extra1 is cleaned. This is why I put the comment like that. Also I would like to know what is your case, since pdm sync and pdm remove are only useful in local development, namely, you are not likely to remove packages in CI or deployment.

An option flag shou…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@linw1995
Comment options

@frostming
Comment options

@gdiscry
Comment options

@Hnasar
Comment options

Answer selected by linw1995
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants