Bin/omero admin cleanse /OMERO

if I wan’t to do a:

bin/omero admin cleanse /OMERO

in a cron-job every night, I have to put in the root-passwort

What is the right way to handle this?

A nice weekend to all

Hi @And,

Independently of the how question, are you sure you want to run this nightly? Do you know that you are generating numerous undeleted files and if so, do you know why?

There’s no great way to handle this at the moment, an issue we’re aware of ( You can create a long-lived session and either put that value in your script or store it in an extra file to be read by the script, but it will be revoked on server restart. There are a couple of related projects floating around:

but they can only do so much to workaround the central problem.


Hi Josh,
thanks for your answer!

Probably my fault: I’ve thought I’ve read that one should run this script frequently for maintenance.
I’ve never run this script befor, but I did this morning a dry-run:

bin/omero admin cleanse --dry-run /OMERO | grep remove | wc -l

this loop breaks after 2006 hits with the following error:

omero.ValidationException: exception ::omero::ValidationException
serverStackTrace =
serverExceptionClass =
message = /Mueller_52/2017-07/06/13-53-59.417/ does not exist

I asume there is more to clean…

Ok thanks again. I leave that in that state and run the “…cleanse…” from time to time by hand.

Hope to see you soon

It’s certainly not great that you got that error, I’d guess it’s reproducible. Could you try running the cleanse again and attach the output here or zip it and send it to If possible it’d be great if you could include the part of the server’s Blitz-0.log for when that error occurs as there may be more detail in that. It may be that the cleanse should be better at handling whatever situation is triggering this.

Hi Mark,
thank you for your answer and apologise for my late replay:

I did a dirty workaround:
I did a mkdir for the missing directory and ran the “…cleanse…” again.
Now the script found another missing directory and I did the same

That was it - now everything is fine…
…should I concern ?

Have a nice day!

No, that should be fine, thank you very much for the update and detail. We’ll look at making admin cleanse cope better with that kind of situation in future.