19 C
New York
Saturday, August 13, 2022

Flutter: How to Repair/Remove all Dependencies in .pub-cache

- Advertisement -

If you are developing an app using Flutter and have encountered a problem related to one or more packages being broken in the system cache (in the ./pub-cache folder), you can reinstall all your cached dependencies by executing the command below:

flutter pub cache repair

Screenshot:Advertisements

This process can take from a few tens of seconds to several tens of minutes, depending on the number of packages to download and your internet speed.

If you want to delete all cached packages to get more free disk space or solve some problems, run the following command:

flutter pub cache clean

You’ll be asked to confirm your decision:

AdvertisementsType “Y” to continue:

As of now, you’ll have to run flutter pub get in your projects to install the plugins you are using.

That’s it. Further reading:

You can also check out our Flutter category page or Dart category page for the latest tutorials and examples.

Advertisements
- Advertisement -

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles