Desinstalando pnpm

Eliminando los paquetes instalados globalmente#

Antes de eliminar la CLI de pnpm, es recomendado eliminar todos los paquetes globales que instaló mediante pnpm.

To list all the global packages, run pnpm ls -g. Hay dos formas de eliminar los paquetes globales:

  1. Run pnpm rm -g <pkg>... with each global package listed.
  2. Run pnpm root -g to find the location of the global directory and remove it manually.

Eliminando la CLI de pnpm#

Si utilizó el script para instalar pnpm (o npx), entonces debería poder desinstalar la CLI de pnpm usando:

rm -rf "$PNPM_HOME"

You might also want to clean the PNPM_HOME env variable in your shell configuration file ($HOME/.bashrc, $HOME/.zshrc, $HOME/.config/fish/config.fish, or $HOME/.config/powershell/profile.ps1).

Si usó npm para instalar pnpm, entonces debe usar npm para desinstalar pnpm:

npm rm -g pnpm

Eliminando el almacén direccionable de contenido global#

rm -rf "$(pnpm store path)"

Si usó pnpm en discos no primarios, debe ejecutar el comando anterior en cada disco, donde se usó pnpm. pnpm crea una almacén por disco. On a disk other than the one with the pnpm home directory, the store is a .pnpm-store directory near the root of the disk, or node_modules/.pnpm-store inside the project.

Removing the cache, state, and configuration#

pnpm also writes to these directories. Remove them too:

  • the cache directory, see cacheDir for its default location
  • the state directory, see stateDir for its default location
  • the directory of the global configuration file, see Global configuration