How to Uninstall and Install hugo on Ubuntu 22.04

Updated: September 3, 2022

Hugo is a static site generator written in Go. It is optimized for speed, ease of use, and configurability. Hugo takes a directory with content and templates, and renders them into a full HTML website. In this guide, I will show you ways to install hugo Ubuntu 22.04.

Requirements to install

  • OS: hugo needs Ubuntu 22.04 to work
  • Privileges: Make sure you are able to execute sudo commands.

Prerequisites to install hugo on Ubuntu 22.04

Install hugo Ubuntu 22.04

hugo is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one that you think is easy and you can follow.

Install hugo 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 instructions to get hugo on your Ubuntu 22.04.

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

sudo apt -y update

Step 2: Install the package on Ubuntu 22.04. After updating the system, you can install hugo Ubuntu by executing this command in the terminal.

sudo apt-get install hugo

Install hugo using Aptitude

You must run this command to install Aptitude if you haven’t already done so on Ubuntu.

sudo apt -y install aptitude

After installing, you can now install hugo by 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 this Linux command:

sudo apt -y update

Step 2: Start installing the packages on Ubuntu 22.04. After updating the system, you can install hugo Ubuntu by executing this command in the terminal.

sudo aptitude -y install hugo

Install hugo from Ubuntu Software Center

If you use Ubuntu, Ubuntu Software Center should be your next choice. Because it provides many applications, including hugo. You can start the installation by following these steps:

Step 1: Open Ubuntu Software Center from Applications menu

You must press the Super + A key combination. It will display the application menu, where you can view and search for installed applications on your system. You need to search for Ubuntu Software and open it.

Step 2: Searching for hugo in Ubuntu Software

Because the Ubuntu Software Center contains many packages, we must type hugo into the search box to see the results. After that, you can install hugo by clicking the Install button.

Install hugo from Software Center on Ubuntu 22.04

Install hugo using Snap

Snap is a software package and deployment system that uses self-contained packages, or snaps, to deliver software to users. As a result, Snap enables you to install hugo easily. Simply copying and pasting this command into the terminal to execute it.

sudo snap install hugo

Uninstall hugo on Ubuntu 22.04

Have you ever thought about how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone can easily uninstall any program, not just a package.

This command can be used to uninstall hugo from Ubuntu 22.04 if it was installed using APT or Aptitude.

sudo apt remove --auto-remove hugo

To uninstall hugo and remove its data and dependencies, you can also use the following command:

sudo apt autoremove --purge hugo

If you installed hugo using Snap, you could run this command:

sudo snap remove hugo


In this guide, I showed you ways to install hugo on Ubuntu 22.04 and some ways to uninstall hugo too. If you need any help, don’t hesitate to contact me. I’m very glad to answer them.