Fixes #5326: remove old node execution from database when we delete repo...

...rts