docs: def uninstall(self, pkgname, *args, **kwargs):
          """A context manager which allows uninstallation of packages from the virtualenv
  
          :param str pkgname: The name of a package to uninstall
  
          >>> venv = VirtualEnv("/path/to/venv/root")
          >>> with venv.uninstall("pytz", auto_confirm=True, verbose=False) as uninstaller:
                  cleaned = uninstaller.paths
          >>> if cleaned:
                  print("uninstalled packages: %s" % cleaned)
          """
  
          auto_confirm = kwargs.pop("auto_confirm", True)
          verbose = kwargs.pop("verbose", False)
          with self.activated():
              pathset_base = self.get_monkeypatched_pathset()
              dist = next(
                  iter(filter(lambda d: d.project_name == pkgname, self.get_working_set())),
                  None
              )
              pathset = pathset_base.from_dist(dist)
              if pathset is not None:
                  pathset.remove(auto_confirm=auto_confirm, verbose=verbose)
              try:
                  yield pathset
              except Exception as e:
                  if pathset is not None:
                      pathset.rollback()
              else:
                  if pathset is not None:
                      pathset.commit()
              if pathset is None:
                  return