Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle keeps the wrapper's dist zip in the .gradle folder after unzipping, using double the space #19480

Closed
altrisi opened this issue Jan 3, 2022 · 1 comment · Fixed by #19495
Assignees
Labels
a:bug closed:duplicate Duplicated or superseeded by another issue

Comments

@altrisi
Copy link
Contributor

altrisi commented Jan 3, 2022

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

  • Run some gradle script that causes the download of a distribution.
  • Go to {userdir}/.gradle/wrapper/dists/gradle-{version}-bin/{random characters}.
  • Find that there's a zip whose contents are unzipped directly next to it

Your Environment

Build scan URL: Not relevant
OS: Windows 10.

@altrisi altrisi changed the title Gradle keeps a copy of the wrapper's dist zip in the .gradle folder after unzipping, using double the space Gradle keeps the wrapper's dist zip in the .gradle folder after unzipping, using double the space Jan 3, 2022
@donat donat self-assigned this Jan 7, 2022
@donat
Copy link
Member

donat commented Jan 24, 2022

Duplicate of #3605

@donat donat marked this as a duplicate of #3605 Jan 24, 2022
@donat donat closed this as completed Jan 24, 2022
@donat donat removed the to-triage label Jan 24, 2022
@ljacomet ljacomet added the closed:duplicate Duplicated or superseeded by another issue label Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug closed:duplicate Duplicated or superseeded by another issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants