Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why flutter pub cache repair downloads every package version previously used?

Tags:

flutter

dart

The command flutter pub cache repair downloads every package version previously used, even of libraries that I no longer use. Why?

Is there any way to clean everything and download only the last packages version?

like image 203
Davide Bicego Avatar asked Oct 27 '25 05:10

Davide Bicego


1 Answers

Unfortunately, Dart development team believes that disk space problems are a thing of the past, and does not provide a standard command to clear the global cache.

Therefore, there is only one way - it is to clear the folder ~/.pub-cache/hosted/pub.dartlang.org yourself. You can then reinstall packages for each actual application separately.

like image 103
Spatz Avatar answered Oct 29 '25 22:10

Spatz