Ways to Install or Uninstall hcloud-cli on Ubuntu 22.04

Updated: September 3, 2022

hcloud-cli is a command-line interface for interacting with Hetzner Cloud. In this guide, I will show you ways to install hcloud-cli Ubuntu 22.04.


  • Operating system: Ubuntu 22.04 or older Ubuntu versions
  • Privileges: Make sure you are able to execute sudo commands.

Prerequisites to install hcloud-cli on Ubuntu 22.04

Install hcloud-cli Ubuntu 22.04

hcloud-cli is one of the popular ways on Ubuntu now so that this tutorial will show you some ways to install it. Choose the one that you think is easy and you can follow.

Install hcloud-cli using APT

This is a popular method for installing any Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these steps to install hcloud-cli on your Ubuntu.

Step 1: Update the APT database to download new packages from Ubuntu. Opening the terminal and executing the following Linux command:

sudo apt update

Step 2: Start the package installation on Ubuntu 22.04. After updating the system, you can install hcloud-cli Ubuntu by pasting this command into the terminal and executing it.

sudo apt-get install hcloud-cli

Install hcloud-cli using Aptitude

With Aptitude, users can view a list of available packages and manage their installation, upgrade, and removal of packages. If you didn’t install it on Ubuntu, you need to install it by executing this command.

sudo apt-get -y install aptitude

Then, you can now install hcloud-cli, just following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Obtain new packages from Ubuntu by updating the APT database. Opening the terminal and executing the following Linux command:

sudo apt update

Step 2: Install the package on Ubuntu 22.04. You can now install hcloud-cli Ubuntu by executing this command in the terminal.

sudo aptitude install hcloud-cli

Uninstall hcloud-cli on Ubuntu 22.04

Have you ever thought that uninstalling an application from Ubuntu might be challenging? You’re wrong; any program, not just a hcloud-cli, can be easily uninstalled by anyone.

You can uninstall hcloud-cli Ubuntu by running this command if you installed it using APT or Aptitude.

sudo apt remove --auto-remove hcloud-cli

If you want to uninstall hcloud-cli and remove its data and dependencies, you can also run the following command:

sudo apt autoremove --purge hcloud-cli


In this guide, I showed you ways to install hcloud-cli on Ubuntu 22.04 and ways to uninstall hcloud-cli too. Please do not hesitate to contact me if you require assistance. I’m delighted to respond.