Add support for cleaning cache for a specific package: dart pub cache clean <package>
#4460
Labels
type-enhancement
A request for a change that isn't a bug
Currently, the
dart pub cache clean
command removes all cached packages, which can be inconvenient when a developer only needs to refresh the cache for a single package. This is particularly relevant when working with Git dependencies, as changes to a Git-based package do not trigger automatic updates unless the version or commit reference changes.Feature Request:
Introduce a feature in the
dart pub cache
command to allow developers to clean the cache for a specific package without affecting the entire cache. The proposed syntax could be:Benefits:
Use Case:
For example, when a Git dependency (
my_package
) is updated in the remote repository but retains the same version inpubspec.yaml
, developers currently need to either:With this feature, developers could simply run:
This enhancement would streamline workflows for projects using Git dependencies or frequently updated packages.
The text was updated successfully, but these errors were encountered: