Delete Empty Folders On Game Close
by SmilerRyan
Delete Empty Folders On Game Close removes empty folders in the Minecraft instance when the game shuts down, with an optional text file for paths to keep.
What it does
When the game closes, the mod searches the instance folder for folders that contain no files and deletes them. Folders are found through every level of nesting, so an empty folder inside another empty folder is removed as well. The search only covers the current Minecraft instance's folder, so files outside it are never touched.
Some folders should stay even when empty, and for that the mod reads an optional exclusions file named cleanup_exclusions.txt in the Minecraft folder. Each line holds one path to skip, relative to the main folder, for example saves/saves. Repeat the line for every folder that should be spared. Without the file, the mod uses no exclusions and deletes every empty folder it finds. Players who want to stop the cleanup can disable or remove the mod.
The mod is client-side only, so a server does not need it and players join without installing it. It is built for Fabric and published for 1.14 – 1.21.11 with 43 release versions; the latest Fabric file is 2 for 1.21.11, dated 2026-06-13. The code is All rights reserved and not open source.
Key features
Automatic cleanup on close
When the game exits, empty folders in the instance are removed without any action from the player.
Nested folder handling
Folders that become empty only after their subfolders are removed are cleaned up in the same pass.
Optional exclusions file
A plain text file in the Minecraft folder lists paths that must not be deleted, one per line.
Instance-only scope
Deletion is limited to the current Minecraft instance folder, so content outside it stays in place.
Gallery
Compatibility
Latest build for each game version and loader.
1.21.x12 of 12 versions with builds
1.20.x7 of 7 versions with builds
1.19.x5 of 5 versions with builds
1.18.x3 of 3 versions with builds
1.17.x2 of 2 versions with builds
1.16.x6 of 6 versions with builds
1.15.x3 of 3 versions with builds
1.14.x5 of 5 versions with builds
Only full game releases are shown. This mod publishes no snapshot builds.
Questions
Does Delete Empty Folders On Game Close need Fabric API?
Does a server need this mod?
How does the mod know which folders to keep?
Which game versions does the mod support?
In the catalog
Delete Empty Folders On Game Close is one of 7,555 Cursed mods on ModsFinder, and one of 4,235 Cursed mods for Fabric. 19,862 mods support Minecraft 1.21.11.
More from SmilerRyan
Similar mods
What the author says
When the game closes, it searches for and deletes any empty folders. It does not delete empty files or anything outside of the current minecraft instances folder.
Official listing
- Modrinth page
- modrinth.com/mod/delete-empty-folders-on-game-close
- Owner
- SmilerRyan
- Published
- 2026-06-13
- Updated on Modrinth
- 2026-06-13
- Facts verified
- 2026-10-15
