only delete public key if present