How to Clear Gradle Cache on Mac


In order to clear the cache of Gradle on the Mac running on macOS follow the below steps.

  1. Open Terminal App,
  2. Now run the command: ~/.gradle/caches/ to navigate to the Gradle caches under your home directory.
  3. Now run command open . to open the current Caches directory in Finder.
    Commands to navigate Gradle Cache on Mac
  4. Delete all the Cache you want to.
Gradle Cache in Finder App on Mac

Delete Gradle Cache using gradle command

  • Open Terminal App,
  • Run the command: gradle cleanBuildCache (or can even use ./gradlew cleanBuildCache)

Delete Gradle Cache using Android Studio IDE

  • Open Android Studio App,
  • Go to File -> Invalidate Caches... -> Invalidate Caches and Restart
Android Studio Invalidate Caches

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org



















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap