ensure cleanup before restarting named container