Revert "Changed the delete logic due to issues with running managed_directory :clean delayed"

This reverts commit 375de7b2d399ce844bc4d43a641759ac0ed727f5.