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

Have Questions? Post them here!