Issue
In which circumstances is it safe respectively unsafe to rm -rf ~/.m2/repository
provided that I'm working online and I have access to all needed artifacts via remote repositories.
Solution
When you retrieve all dependencies from remote repositories, then the local repo becomes nothing more than a cache.
Like all caches, the Maven local repo can occasionally become "dirty". In an acknowledged act of paranoia and overkill, I schedule a periodic cron job to purge the local repositories on my build machines. This forces a re-sync with my Nexus Maven repository.
Answered By - Mark O'Connor
Answer Checked By - Marie Seifert (JavaFixing Admin)