Problem is that the command instantly terminates and does not wait for the deletion with recurse to complete. The deletions can take up to five minutes to complete. What I am doing now is opening a second connection and looping until the directory disappears. Seems there should be a better way