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?
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?
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.