_upgrade(label, type) {
    // Lock out upgrade calls after the first time upgrading the cache.
    if (upgraded[label]) {
      return;
    }

    if (!this._canUpgrade(label, type)) {
      // Only way to get repeatable behavior in npm: start over.
      // We turn an `_upgrade` task into an `_install` task.
      fs.removeSync(path.join(this.dirs[label], translate(type, 'path')));
      return this._install(label, type);
    }

    this._removeLinks(label, type);
    commands[type].invoke(translate(type, 'upgrade'), { cwd: this.dirs[label] });
    this._restoreLinks(label, type);

    upgraded[label] = true;
  }
The `_upgrade` method guarantees that the contents of the manifest are
allowed to drift in a SemVer compatible manner. It ensures that CI is
always running against the latest versions of all dependencies.

@private
@method _upgrade
@param {String} label The label for the cache.
@param {String} type The type of package cache.