Cleanup for BSD and remote systems