Gradle keeps the wrapper's dist zip in the .gradle
folder after unzipping, using double the space
#19480
Labels
.gradle
folder after unzipping, using double the space
#19480
Expected Behavior
Gradle should remove the wrapper's dist zip file after it has been unzipped right next to it.
Current Behavior
The zip is kept, wasting double the space on the hard drive for a no longer used file.
Context
I was looking at cleaning disk space by removing some of my old files, and thought about removing old wrapper distributions. To my surprise, when I opened the
{userdir}/.gradle/wrapper/dists
folder, I found that each wrapper I had used also kept the zip file that was used to download it, therefore wasting double the space. Given each one of those distributions are over 100MB each zipped (with Gradle 7.3's zip being 110MB on my machine), this is an enormous waste of space, specially if you have multiple wrapper versions from normally updating Gradle. In my case I had 12 versions, meaning that over 1GB was wasted storing only the unused zips.Steps to Reproduce
{userdir}/.gradle/wrapper/dists/gradle-{version}-bin/{random characters}
.Your Environment
Build scan URL: Not relevant
OS: Windows 10.
The text was updated successfully, but these errors were encountered: