anchor.diff:  }
   
   Future removePackageVersion(String packageName, String version) async {
  -  await dbService.withTransaction((Transaction T) async {
  +  await withRetryTransaction(dbService, (tx) async {
       final Key packageKey = dbService.emptyKey.append(Package, id: packageName);
  -    final package = (await T.lookup([packageKey])).first as Package;
  +    final package = (await tx.lookup([packageKey])).first as Package;
       if (package == null) {
  -      throw Exception('Package $packageName does not exist.');
  -    }
  -
  -    final versionsQuery = T.query<PackageVersion>(packageKey);
  +      print('Package $packageName does not exist.');
  +    }
  +
  +    final versionsQuery = tx.query<PackageVersion>(packageKey);
       final versions = await versionsQuery.run().toList();
       final versionNames = versions.map((v) => v.version).toList();
  -    if (!versionNames.contains(version)) {
  +    if (versionNames.contains(version)) {
  +      final deletes = [packageKey.append(PackageVersion, id: version)];
  +      tx.queueMutations(deletes: deletes);
  +    } else {
         print('Package $packageName does not have a version $version.');
       }
   
  
positive.code: }
  
  Future removePackage(String packageName) async {
    await dbService.withTransaction((Transaction T) async {
      final deletes = <Key>[];
      final Key packageKey = dbService.emptyKey.append(Package, id: packageName);
      final package = (await T.lookup([packageKey])).first as Package;
      if (package == null) {
        print('Package $packageName does not exists.');
      } else {
        deletes.add(packageKey);
      }
  
      final versionsQuery = T.query<PackageVersion>(packageKey);
      final versions = await versionsQuery.run().toList();
      final List<Version> versionNames =
          versions.map((v) => v.semanticVersion).toList();
  
negative.code:         .map((version) => storage.remove(packageName, version.toString())));
  
      print('Committing changes to DB ...');
      tx.queueMutations(deletes: deletes);
    });
  
    print('Removing package from dartdoc backend ...');
  