Skip to content

Instantly share code, notes, and snippets.

View sreenadhsr's full-sized avatar

Sreenadh SR sreenadhsr

View GitHub Profile
@sreenadhsr
sreenadhsr / clean-maven-repo.sh
Last active September 15, 2019 21:19 — forked from cescoffier/cleanup_maven_repository.sh
A shell script to cleanup your local maven repository. It removes all snapshot from more than 6 months. Optionally you can pass number of days as well.
#!/bin/sh
#
# Original author: Clement Escoffier (https://github.com/cescoffier/)
# Modified by: sreenadhsr (https://github.com/sreenadhsr/)
#
M2_REPO=${HOME}/.m2
OLDFILES=${HOME}/.m2/deleted_artifacts.txt
AGE=181 # more or less 6 months and it's a palindromic prime number, so it's cool