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.
Clearing the global system cache To clear your system cache with an older SDK, you can manually delete the 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.
By default, this directory is located under . pub-cache in your home directory (on macOS and Linux), or in %LOCALAPPDATA%\Pub\Cache (on Windows).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With