code: public void removeUnidentifiedArtifacts() {
          Set<File> allKnownArtifacts = new HashSet<File>();
          for (Package pkg : prev.packages().values()) {
              for (File f : pkg.artifacts().values()) {
                  allKnownArtifacts.add(f);
              }
          }
          // Do not forget about javac_state....
          allKnownArtifacts.add(javacState);
  
          for (File f : binArtifacts) {
              if (!allKnownArtifacts.contains(f)) {
                  Log.debug("Removing "+f.getPath()+" since it is unknown to the javac_state.");
                  f.delete();
              }
          }
          for (File f : headerArtifacts) {
              if (!allKnownArtifacts.contains(f)) {
                  Log.debug("Removing "+f.getPath()+" since it is unknown to the javac_state.");
                  f.delete();
              }
          }
          for (File f : gensrcArtifacts) {
              if (!allKnownArtifacts.contains(f)) {
                  Log.debug("Removing "+f.getPath()+" since it is unknown to the javac_state.");
                  f.delete();
              }
          }
      }
docs: Scan all output dirs for artifacts and remove those files (artifacts?)
  that are not recognized as such, in the javac_state file.