Skip to content

Instantly share code, notes, and snippets.

@matthiasbalke
Created February 1, 2017 18:46
Show Gist options
  • Save matthiasbalke/d8d3ff706c3d9ec787fb481925719f04 to your computer and use it in GitHub Desktop.
Save matthiasbalke/d8d3ff706c3d9ec787fb481925719f04 to your computer and use it in GitHub Desktop.
delete a selected artifact / group from gradle local cache
#!/bin/bash
deleteGradleCache() {
local id=$1
if [ -z "$id" ]; then
echo "Please provide an group or artifact id to delete"
return 1
fi
find ~/.gradle/caches/ -type d -name "$id" -prune -exec rm -rf "{}" \; -print
}
deleteGradleCache $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment