Install CleanMCMod
Three things are needed: Fabric Loader, Fabric API, and the CleanMCMod jar built for your exact Minecraft version.
Requirements
| Component | Version |
|---|---|
| Minecraft: Java Edition | 1.21.8, 1.21.9, 1.21.10, 1.21.11 or 26.1, 26.2, 26.3 - see versions |
| Java | 21 on 1.21.x, 25 on 26.x (as the game itself requires) |
| Fabric Loader | 0.16.0 or newer (0.20.1 is what CI builds against) |
| Fabric API | required at runtime |
| Mod Menu | optional adds the Config button |
Drop the jar in mods/ next to Fabric API. The jar declares environment: client, so a dedicated server ignores it.
In game
| Entry point | What it does |
|---|---|
| F7 | Opens the main screen from anywhere; rebindable under Controls |
| Title screen button | CleanMCMod… in the top right corner, before a world is loaded |
/cleanmcmod scan | Lists every cache present with its file count and size |
/cleanmcmod clean | Runs a clean (or a dry run when that setting is on) and reports the totals |
/cleanmcmod screen | Opens the same screen as F7 |
The main screen lists each cache with its size, a Dry run line that says nothing will be deleted while that setting is on, and buttons for Clean now, Rescan, Settings… and Update mods….
Settings
Eight toggles, saved to config/cleanmcmod.json the moment you change them:
| Setting | Effect |
|---|---|
| Game logs | Include logs/ in a clean |
| Crash reports | Include crash-reports/ |
| Debug dumps | Include the game's debug dump files |
| Server resource packs | Include the cached server resource pack |
| Loader and mod caches | Include the Fabric remapped-jar cache and Mixin debug output |
| Asset cache | Include the deep asset cache; the game re-downloads it from Mojang |
| Mod-cache auto-detection | Find config/<mod>/…/cache folders and treat them as optional targets |
| Dry run | Measure and report, delete nothing |
Build from source
Every version lives on its own branch; the wrapper is checked in, so no Gradle installation is required.
git clone https://github.com/PiBOH/cleanmcmod cd cleanmcmod git switch 26.3 # or 1.21.11, 26.1, 1.21.8 ... export JAVA_HOME=/path/to/jdk-25 # JDK 25 builds every branch ./gradlew clean build # jar in build/libs/
The artifact is cleanmcmod-<mod version>+<minecraft version>.jar; that file is what gets uploaded to Modrinth.
Optional Mod Menu
If Mod Menu is installed, CleanMCMod appears in its list and its Config button opens the settings screen. Mod Menu is compiled against with compileOnly and declared as suggests, never depends: without it the game boots normally and no Mod Menu class is loaded.