gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Automatic update failed. Please try updating manually

Open liusheng2020 opened this issue 4 months ago • 7 comments

What happened?

Image Image

Gemini CLI update available! 0.18.4 → 0.19.0
Installed with npm. Attempting to automatically update now...

✕ Automatic update failed. Please try updating manually

What did you expect to happen?

norma update automatically

Client information

About Gemini CLI

CLI Version 0.18.4
Git Commit 2e8d7831c
Model gemini-3-pro-preview
Sandbox no sandbox
OS linux
Auth Method OAuth
User Email liusxxxxxxx.edu.cn
GCP Project xxxxxxxx

Login information

No response

Anything else we need to know?

No response

liusheng2020 avatar Dec 03 '25 02:12 liusheng2020

Found possible duplicate issues:

  • #6741
  • #11504
  • #13807
  • #10780
  • #4076

If you believe this is not a duplicate, please remove the status/possible-duplicate label.

gemini-cli[bot] avatar Dec 03 '25 02:12 gemini-cli[bot]

Hi @liusheng2020 , thanks for filling this issue, to get a better understanding of what's going on here, how did you initially install the cli ?

galz10 avatar Dec 03 '25 21:12 galz10

I initially install the cli by: rm -rf /home/ls2410/.npm-global/lib/node_modules/@google/gemini-cli npm install -g @google/gemini-cli@latest

every time "Automatic update failed. Please try updating manually", I run:

rm -rf /home/ls2410/.npm-global/lib/node_modules/@google/gemini-cli
npm install -g @google/gemini-cli@latest

to update it manually.

But it always "Automatic update failed".

liusheng2020 avatar Dec 06 '25 07:12 liusheng2020

Hi @liusheng2020 , thanks for filling this issue, to get a better understanding of what's going on here, how did you initially install the cli ?嗨,感谢您填写这个问题,为了更好地理解这里发生的事情,您最初是如何安装cli的?

I forget how initially install the cli. But every time "Automatic update failed. Please try updating manually", I run:

rm -rf /home/ls2410/.npm-global/lib/node_modules/@google/gemini-cli
npm install -g @google/gemini-cli@latest

so that it can be updated manually.

But it always "Automatic update failed". How can it Automatic update successfully without manually operation and without "rm -rf xxxx” ?

liusheng2020 avatar Dec 06 '25 07:12 liusheng2020

+1 Also I get the same error

Image

AndreSand avatar Dec 10 '25 02:12 AndreSand

I'd been getting the same issue / temporary resolution for weeks. Originally installed on Fedora 43 using

npm install -g @google/gemini-cli@preview`

I eventually resolved the issue by running:

npm uninstall -g @google/gemini-cli
rm -rf ~/.gemini

I did a system update & restart after that, but that is superstition and not actually required

then reinstall:

npm install -g @google/gemini-cli

Updates have been working smoothly for me again. just needed to re-install plugins and stuff after the full removal.

Lyonk71 avatar Dec 12 '25 23:12 Lyonk71

  1. Create a directory for global packages in your home folder:
    mkdir ~/.npm-global
    
  2. Configure npm to use this new directory:
    npm config set prefix '~/.npm-global'
    
  3. Update your PATH (so your terminal can find the installed tools): Open your profile file (usually ~/.bashrc or ~/.profile) and add this line to the bottom:
    export PATH=~/.npm-global/bin:$PATH
    
  4. Refresh your terminal:
    source ~/.bashrc
    
  5. Try installing again (without sudo):
    npm install -g @google/gemini-cli@preview
    

pasarenicu avatar Dec 14 '25 18:12 pasarenicu

  1. Create a directory for global packages in your home folder: mkdir ~/.npm-global
  2. Configure npm to use this new directory: npm config set prefix '~/.npm-global'
  3. Update your PATH (so your terminal can find the installed tools): Open your profile file (usually ~/.bashrc or ~/.profile) and add this line to the bottom: export PATH=~/.npm-global/bin:$PATH
  4. Refresh your terminal: source ~/.bashrc
  5. Try installing again (without sudo): npm install -g @google/gemini-cli@preview

not work

liusheng2020 avatar Dec 18 '25 12:12 liusheng2020

I'm on using laptop MacBook M4, and I managed to fix the issue with help from Claude Code

Fix:

sudo rm -rf /opt/homebrew/lib/node_modules/@google/gemini-cli
sudo npm install -g @google/gemini-cli

AndreSand avatar Dec 19 '25 18:12 AndreSand

same issue here on ubuntu

camelator avatar Dec 20 '25 15:12 camelator