def METHOD_NAME(self, pkg, outdated, skip_dependencies=False):
    if pkg.metadata.spec.external:
        vcs = VCSClientFactory.new(pkg.path, pkg.metadata.spec.uri)
        assert vcs.update()
        pkg.metadata.version = self._fetch_vcs_latest_version(pkg)
        pkg.dump_meta()
        return pkg
    # uninstall existing version
    self.uninstall(pkg, skip_dependencies=True)
    return self.install(
        PackageSpec(
            id=pkg.metadata.spec.id,
            owner=pkg.metadata.spec.owner,
            name=pkg.metadata.spec.name,
            requirements=outdated.wanted or outdated.latest,
        ),
        skip_dependencies=skip_dependencies,
    )