Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clean up .gradle forlde on MacOS

I'm trying to clean up some space on my Mac, and I have noticed that .gradle folder takes 4.49GB. Inside it, I can see that there is a cache folder that is 1.23GB large and wrapper that is 3.18GB large. Inside the wrapper folder I can see such a structure:

gradle-2.13-all     
gradle-3.1-bin      
gradle-3.5-rc-2-bin 
gradle-3.5.1-bin    
gradle-4.2-all      
gradle-4.2.1-bin

And so on. So this looks like some old data that is still present. I did not found any gradle command to clean up it's old data nor dit I found whether this data is important. So the question is what can be deleted in order to free some space?

like image 670
Sergii Bishyr Avatar asked Mar 05 '23 15:03

Sergii Bishyr


1 Answers

You can safely delete the whole .gradle folder if you don't need to work offline. This folder will be recreated as soon, as you will run any Gradle task. And Gradle will download some of the the previously cached dependencies and wrapped Gradle versions automatically.

For sure, you likely have cached more dependencies and wrapped versions, you need at the moment, so it can make some free space for you.

like image 119
Stanislav Avatar answered Mar 09 '23 07:03

Stanislav