code: public void deletePackage(String packageName) {
      deletedPackages.add(packageName);
      packageInfos.remove(packageName);
      mapForPackage(activityFilters, packageName).clear();
      mapForPackage(serviceFilters, packageName).clear();
      mapForPackage(providerFilters, packageName).clear();
      mapForPackage(receiverFilters, packageName).clear();
    }
docs: Uninstalls the package from the system in a way, that will allow its discovery through {@link
  PackageManager#MATCH_UNINSTALLED_PACKAGES}.