shadows/framework/src/main/java/org/robolectric/shadows/ShadowPackageManager.java
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();
  }
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();
  }
Uninstalls the package from the system in a way, that will allow its discovery through {@link
PackageManager#MATCH_UNINSTALLED_PACKAGES}.