code: public void removeSuperfluousArtifacts(Set<String> recentlyCompiled) {
          // Nothing to do, if nothing was recompiled.
          if (recentlyCompiled.size() == 0) return;
  
          for (String pkg : now.packages().keySet()) {
              // If this package has not been recompiled, skip the check.
              if (!recentlyCompiled.contains(pkg)) continue;
              Collection<File> arts = now.artifacts().values();
              for (File f : fetchPrevArtifacts(pkg).values()) {
                  if (!arts.contains(f)) {
                      Log.debug("Removing "+f.getPath()+" since it is now superfluous!");
                      if (f.exists()) f.delete();
                  }
              }
          }
      }
docs: Remove artifacts that are no longer produced when compiling!