@echo off
set REPOSITORY_PATH=D:\tools\path\reporem 开始删除...
for /f "delims=" %%i in (‘dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"‘) do (
del /s /q %%i
)
rem 删除完成!!
pause
set REPOSITORY_PATH=(仓库路径例如 D:\java\apache-maven-3.6.1\maven-repo)
把这个路径换成你仓库路径,然后以管理员运行。(重要!)
建议把这段命令设置成bat文件,以便之后使用。
原文:https://www.cnblogs.com/hhddd-1024/p/14275205.html