ports: Fix -d and other cases of deleting the ports tree