flutter clear pub cache

Hi Guys, Welcome to Proto Coders Point. In this flutter article let’s understand how to repair cache in flutter.

So you are developing a flutter application & encountered an issue in dependencies cache or the package is broken due to several issues(in the ./pub-cache folder).

To solve this you can simple repair cache by running below command:

How to clear the cache on firestick...
How to clear the cache on firestick? | Force stop firestick | How to reset factory settings?
flutter pub cache repair
flutter pub cache repair

The process of repairing cache in flutter will take minimum 10 seconds or more, depending of how many dependencies package you have & internet speed.

Table of Contents

Flutter clear cache

If you are willing to clear/delete cache package, then run below command:

flutter pub cache clean

While deleting the flutter project cache, you will be asked to confirm y/N, Press y:

flutter pub cache clean
flutter pub cache clean

After successfully above flutter clean, you need to run flutter pub get in your project, it will freshly install all the required plugins.

flutter pub get