2025-07-14 20:13:43 +08:00
|
|
|
# Uninstalling the CLI
|
2025-06-29 19:11:58 +05:30
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
Your uninstall method depends on how you ran the CLI. Follow the instructions
|
|
|
|
|
for either npx or a global npm installation.
|
2025-06-29 19:11:58 +05:30
|
|
|
|
2025-07-14 20:13:43 +08:00
|
|
|
## Method 1: Using npx
|
2025-06-29 19:11:58 +05:30
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
npx runs packages from a temporary cache without a permanent installation. To
|
|
|
|
|
"uninstall" the CLI, you must clear this cache, which will remove gemini-cli and
|
|
|
|
|
any other packages previously executed with npx.
|
2025-06-29 19:11:58 +05:30
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
The npx cache is a directory named `_npx` inside your main npm cache folder. You
|
|
|
|
|
can find your npm cache path by running `npm config get cache`.
|
2025-06-29 19:11:58 +05:30
|
|
|
|
|
|
|
|
**For macOS / Linux**
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# The path is typically ~/.npm/_npx
|
|
|
|
|
rm -rf "$(npm config get cache)/_npx"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**For Windows**
|
|
|
|
|
|
|
|
|
|
_Command Prompt_
|
|
|
|
|
|
|
|
|
|
```cmd
|
|
|
|
|
:: The path is typically %LocalAppData%\npm-cache\_npx
|
|
|
|
|
rmdir /s /q "%LocalAppData%\npm-cache\_npx"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
_PowerShell_
|
|
|
|
|
|
|
|
|
|
```powershell
|
|
|
|
|
# The path is typically $env:LocalAppData\npm-cache\_npx
|
|
|
|
|
Remove-Item -Path (Join-Path $env:LocalAppData "npm-cache\_npx") -Recurse -Force
|
|
|
|
|
```
|
|
|
|
|
|
2025-12-01 11:38:48 -08:00
|
|
|
## Method 2: Using npm (global install)
|
2025-06-29 19:11:58 +05:30
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
If you installed the CLI globally (e.g., `npm install -g @google/gemini-cli`),
|
|
|
|
|
use the `npm uninstall` command with the `-g` flag to remove it.
|
2025-06-29 19:11:58 +05:30
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
npm uninstall -g @google/gemini-cli
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This command completely removes the package from your system.
|