How To Install hugo on Debian 9

In this tutorial we learn how to install hugo on Debian 9. hugo is Fast and flexible Static Site Generator written in Go

Introduction

In this tutorial we learn how to install hugo on Debian 9.

What is hugo

hugo is:

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.

Hugo relies on Markdown files with front matter for meta data. And you can run Hugo from any directory. This works well for shared hosts and other systems where you don??t have a privileged account.

Hugo renders a typical website of moderate size in a fraction of a second. A good rule of thumb is that each piece of content renders in around 1 millisecond.

Hugo is meant to work well for any kind of website including blogs, tumblelogs and docs.

Complete documentation is available at https://gohugo.io/

There are three methods to install hugo on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install hugo Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install hugo using apt-get by running the following command:

sudo apt-get -y install hugo

Install hugo Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install hugo using apt by running the following command:

sudo apt -y install hugo

Install hugo Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install hugo using aptitude by running the following command:

sudo aptitude -y install hugo

How To Uninstall hugo on Debian 9

To uninstall only the hugo package we can use the following command:

sudo apt-get remove hugo

Uninstall hugo And Its Dependencies

To uninstall hugo and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove hugo

Remove hugo Configurations and Data

To remove hugo configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge hugo

Remove hugo configuration, data, and all of its dependencies

We can use the following command to remove hugo configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge hugo

Dependencies

hugo have the following dependencies:

References

Summary

In this tutorial we learn how to install hugo package on Debian 9 using different package management tools: apt, apt-get and aptitude.