Clean up after builds, and remove what you installed¶
eb-local clean removes what builds leave in your prefix: old build logs, downloaded source archives, and the workspaces of builds that failed.
eb-local uninstall removes software you installed, for every CPU target, and eb-local restore brings it back.
With rtrash on PATH, files go to the trash, not away for good.
Before you start¶
rtrash on
PATH;eb-local doctorthen saysok rtrash is on PATH: clean and uninstall move files to the trash. Without it,cleananduninstallremove nothing unless you pass--delete, which deletes for good.For what you built for a project, the same commands with
--project DIR.
Remove old logs and downloaded sources¶
See what
cleanwould remove:eb-local clean --dry-runeb-local: nothing to clean in /home/alice/eessiBy default
cleantakes the build logs in.eb-local/logsmore thanclean.logs_older_than_dayswhole days old, 30 unless your configuration sets another number;--logs-older-than DAYSsets it for one run. EasyBuild removes the log of a build that succeeds from there and keeps a copy in the installation, so these are the logs of builds that failed. A directory among them, such as thereprod_*copy of a failed build’s easyconfig, easyblocks and hooks, goes whole once neither it nor anything in it is newer than that.Add the source archives builds downloaded:
eb-local clean --sources --dry-run/home/alice/eessi/.eb-local/sources/p/pigz/pigz-2.8.tar.gz eb-local: dry run, nothing removed (1 item(s), 0 workspace(s))
Remove them, with the same options and no
--dry-run:eb-local clean --sources/home/alice/eessi/.eb-local/sources/p/pigz/pigz-2.8.tar.gz eb-local: moved 1 item(s) to the trash (rtrash list, rtrash restore)
rtrash listshows what is in the trash, andrtrash restore PATHbrings one file back. Add--jsonto print a single JSON line describing the planned or removed paths for scripts.
Remove the workspace of a failed build¶
A build that fails keeps its workspace in the allocation’s node-local mount, and says so:
eb-local: build workspace kept at /local/alice.23/eb-local.bGSoHPgR; it goes when the allocation ends,
or now with: eb-local clean --workspaces --no-logs
In the same allocation, see what would go:
eb-local clean --workspaces --no-logs --dry-run/local/alice.23/eb-local.bGSoHPgR/ (build workspace) eb-local: dry run, nothing removed (0 item(s), 1 workspace(s))
Remove it:
eb-local clean --workspaces --no-logs/local/alice.23/eb-local.bGSoHPgR/ (build workspace) eb-local: removed 1 build workspace(s)
A workspace is deleted, not moved to the trash: the node-local mount goes when the allocation ends. For a batch job that is still running, here job 24, run the command in that job from a login node:
srun --jobid=24 --overlap eb-local clean --workspaces --no-logs/local/alice.24/eb-local.kapHubdH/ (build workspace) eb-local: removed 1 build workspace(s)
Remove software you installed¶
See what
uninstallwould remove, for every CPU target you built the module for:eb-local uninstall pigz/2.8-GCCcore-15.2.0 --dry-run/home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/software/pigz/2.8-GCCcore-15.2.0/ /home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/modules/all/pigz/2.8-GCCcore-15.2.0.lua /home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/modules/tools/pigz/2.8-GCCcore-15.2.0.lua eb-local: dry run, nothing removed
It takes the installation, its module file in
modules/all, and the link EasyBuild makes to that file from the module’s class, heremodules/tools. Pass--target TARGET(such asx86_64/intel/sapphirerapids, orsapphirerapidswhen unique) to remove and check dependents only for that CPU target.Remove it:
eb-local uninstall pigz/2.8-GCCcore-15.2.0/home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/software/pigz/2.8-GCCcore-15.2.0/ /home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/modules/all/pigz/2.8-GCCcore-15.2.0.lua /home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/modules/tools/pigz/2.8-GCCcore-15.2.0.lua eb-local: moved 1 installation(s) and 2 module file(s) to the trash (eb-local restore brings them back)
EasyBuild leaves an installation read-only, so
rm -rffails on it;uninstallmakes its directories writable first. When another module you installed loads the one you name,uninstalllists that module and removes nothing, as it would then fail to load; name both in one command to remove both.To leave it in place when a usage log names this prefix:
eb-local uninstall pigz/2.8-GCCcore-15.2.0 --usage-log usage.jsonThis runs
eb-keep-logs used --prefix PREFIX --require-none usage.json, where PREFIX is the install prefix, and removes nothing when that command exits 2. eb-local does not read the log. Without--usage-log, uninstall does not ask.To bring it back:
eb-local restore pigz/2.8-GCCcore-15.2.0/home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/software/pigz/2.8-GCCcore-15.2.0/ /home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/modules/all/pigz/2.8-GCCcore-15.2.0.lua /home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/modules/tools/pigz/2.8-GCCcore-15.2.0.lua restored '/home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/software/pigz/2.8-GCCcore-15.2.0' restored '/home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/modules/all/pigz/2.8-GCCcore-15.2.0.lua' restored '/home/alice/eessi/versions/2026.06/software/linux/x86_64/intel/sapphirerapids/modules/tools/pigz/2.8-GCCcore-15.2.0.lua' eb-local: restored 1 installation(s), read-only again, and 2 module file(s)
restorebrings back each path withrtrash restore, then takes write permission away from the installation, as EasyBuild left it.rtrash restorealone brings the installation back with its directories writable.
Check that it worked¶
After uninstall, eb-local list no longer shows the module; here it was the only one:
eb-local list
Nothing is installed in /home/alice/eessi.
After restore, it shows the module again.
If it fails¶
Message |
Cause |
What to do |
|---|---|---|
|
rtrash is not on |
Install rtrash, or pass |
|
|
Pass |
|
Slurm is present, but this shell is outside an allocation and no workstation build recorded a root. |
Run it in the allocation; workstation roots are found from the durable prefix state even after |
|
Another module you installed loads the one you named. |
Name it in the same command too, or keep both. |
|
|
Keep the installation, or run uninstall without |
|
|
Install |
|
|
Read the lines |
|
Nothing of that module is in the trash for this prefix. |
Check |
|
You uninstalled the module twice, as after building it again. |
Run |
|
The module is installed again. |
Keep it, or uninstall it first. |