       }
 
       // All resources within packageMatches were sourced from the current package.
-      // Time to set migrate these.
-
-      // TODO:  Migrate 'em based on their source packages.
+      // Time to set migrate these.  Overwrites any obstructing files with the
+      // the decompressed KMP's contents.
+      do {
+        // We've already parsed the metadata, but now we need to have the files ready for install.
+        let package = try ResourceFileManager.shared.prepareKMPInstall(from: kmpFile) as! Package
+        try packageMatches.forEach { resource in
+          try ResourceFileManager.shared.install(resourceWithID: resource.typedFullID, from: package)
+        }
+        // Post-install cleanup.
+        try FileManager.default.removeItem(at: package.sourceFolder)
+      } catch {
+        log.error("Could not install resource from locally-cached package: \(String(describing: error))")
+      }
 
       matched.append(contentsOf: packageMatches)
     }

    //          then migrate by reinstalling the KMP.
    var matched: [Resource] = []

    localPackages.forEach { package in
      let packageMatches: [Resource] = resources.compactMap { resource in
        if let possibleMatch = package.findResource(withID: resource.typedFullID) {
          if possibleMatch.version == resource.version {


      allLocalPackages = kmpFiles.compactMap { file in
        let filePath = cachedKMPsDirectory.appendingPathComponent(file)
        return (ResourceFileManager.shared.getPackageInfo(for: filePath)!, filePath)
      }
    } catch {
      log.error("Could not check contents of Documents directory for resource-migration assist")
    }

    // Filters out Packages that don't contain the matching resource type.
    let localPackages: [(Package, URL)] = allLocalPackages.compactMap { tuple in
      if let package = tuple.0 as? Package {
        return (package, tuple.1)
      } else {
        return nil
      }
    }

