Menghapus instalasi pnpm
Menghapus paket yang diinstal secara global#
Sebelum menghapus pnpm CLI, sebaiknya untuk menghapus semua paket global yang diinstal oleh pnpm.
To list all the global packages, run pnpm ls -g. Ada dua cara untuk menghapus paket global:
- Run
pnpm rm -g <pkg>...with each global package listed. - Run
pnpm root -gto find the location of the global directory and remove it manually.
Menghapus pnpm CLI#
Jika Anda menggunakan skrip mandiri untuk menginstal pnpm, maka Anda seharusnya dapat menghapus pnpm CLI dengan menghapus direktori home pnpm:
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).
Jika Anda menggunakan npm untuk menginstal pnpm, maka Anda harus menggunakan npm untuk menghapus pnpm:
npm rm -g pnpm
Menghapus penyimpanan beralamat konten global#
rm -rf "$(pnpm store path)"
Jika Anda menggunakan pnpm dalam disk non-primer, maka Anda harus menjalankan perintah di atas dalam setiap disk, di mana pnpm digunakan.
pnpm membuat satu penyimpanan per disk. 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
cacheDirfor its default location - the state directory, see
stateDirfor its default location - the directory of the global configuration file, see Global configuration