move delete_local_mapping into delete_mapping