Is it safe to delete Maven target folders?
Build output that Maven creates in each project, such as compiled classes, test reports and packaged JAR or WAR files.
Safe
Its owner recreates it by itself when it needs it, and nothing you made is lost.
~/
- Only next to pom.xml
- Never inside ~/
Library
What it is
Maven writes everything a build produces into a target folder next to the project's pom.xml file. It creates the folder again the next time you build, and Maven's clean step removes it the same way. Your source code isn't affected.
If it's removed
The next build of each project is a full build. Packages you built are removed until you build them again.
How it's removed
Moved to the Trash, where you can restore it.
The free analyzer finds it and explains it. Removing it is Pro, after a review sheet that lists every move and command. It starts checked in the Cleanup checklist, except inside Documents or Desktop.
Sources
- maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
- maven.apache.org/plugins/maven-clean-plugin
Last checked on 26 Sep 2026. Every entry is written and checked by hand; the app and the command-line tool use the same words.