How To Install Hugo on Ubuntu 18.04

Posted in how to on April 18, 2020 ‐ 1 min read

This method may not be as simple as using the apt utility, but it enables you to install the latest Hugo version which is likely not available from apt repos.

Install

  1. Run the command below to confirm you’re running 64-bit archiecture

    sudo uname -i
    
    • It should return X86_64
  2. Look at the Hugo release page to find the download link for the most recent stable release. It should end in Linux-64bit.deb. Then use wget to download the package.

    wget https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_0.69.0_Linux-64bit.deb
    
  3. Use dpkg to install the downloaded app.

    sudo dpkg -i hugo_0.69.0_Linux-64bit.deb
    
  4. If it installed successfully, you can run the hugo version command to confirm it’s working as expected.

    hugo version
    
    • It should return something similar to Hugo Static Site Generator v0.69.0-4205844B linux/amd64 BuildDate: 2020-04-10T09:12:34
  5. You can delete the downloaded package once it’s successfully installed.

    rm hugo_0.69.0_Linux-64bit.deb
    

Uninstall

If you no longer need Hugo then you can uninstall it using apt.

sudo apt-getremove --auto-remove hugo