Jails can be removed without running any of their post-removal commands (IP address takedown, unmounting, anything user-specified), generally as a result of non-persistent jails dropping off after their last command is done. These undone tasks can get in the way of bringing the jail up properly the next time.
I've added a -C flag for jail cleanup, which can work two ways:
In conjunction with -r, an existing jail will be removed as usual, and a nonexistent jail will run the post-removal commands as if it were just successfully removed. Those commands may fail, if for example there's nothing that needs unmounting, but there's generally no harm from them running (this is true for user-supplied commands only if the supplied safe commands).
In conjunction with -c, jail creation will be preceded by the same post-removal commands as with -r. Hoever, this time if the commands fail, the jail will not be created. That's a result of the new flag piggybacking on top of the existing restart (-rc) scenario, which removes a jail and then restarts it only if the removal was successful.
It can also go along with the -rc restart, which is just the modified -r case above, followed by a regular -c.
Note that none of this makes sense in jails without a configuration file, and the -C flag won't work in that case.