DEV Community

Cover image for How to install, update and delete github cli in ubuntu / debian
Bibek Gupta
Bibek Gupta

Posted on

How to install, update and delete github cli in ubuntu / debian

How to install github cli

  1. curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
  2. sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
  3. echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
  4. sudo apt update
  5. sudo apt install gh

How to update github cli

  1. First of download lastest github cli from lastest github cli relases
  2. sudo apt install ./gh_linux_amd64.deb

How to remove github cli

1 sudo apt remove gh

Top comments (0)