         for dependency in dependencies where dependency.isInEditableState {
             // If some edited dependency has been removed, mark it as unedited.
             let dependencyPath = editablesPath.appending(dependency.subpath)
-            if !localFileSystem.exists(dependencyPath) {
+            if !fileSystem.exists(dependencyPath) {
                 try unedit(dependency: dependency, forceRemove: true)
                 // FIXME: Use diagnosics engine when we have that.
                 print("warning: \(dependencyPath.asString) was being edited but has been removed, falling back to original checkout.")

        guard !checkedOutRepo.hasUncommitedChanges() else {
            throw WorkspaceOperationError.hasUncommitedChanges(repo: dependencyPath)
        }
        try removeFileTree(dependencyPath)

        // Remove the clone.
        try repositoryManager.remove(repository: dependency.repository)

        }

        // We've loaded the complete set of manifests, load the graph.
        return try PackageGraphLoader().load(rootManifest: currentManifests.root, externalManifests: externalManifests, fileSystem: fileSystem)
    }

    /// Removes the clone and checkout of the provided specifier.
