How to delete the flutter packages in .pub-cache
folder? When we give flutter clean
, it will delete the build folder in the current directory. We can delete it manually, but my requirement is to delete the packages in .pub-cache
folder using the command.
If a dependency is removed from the pubspec and then pub get
is run, it removes the dependency from the .packages file, making the dependency unavailable for importing.
If a packages in your pub cache to change or break, you can use flutter pub cache repair
command performs a clean reinstall of all hosted and git packages in the system cache.