How To Install fonts-firacode on Ubuntu 18.04

In this tutorial we learn how to install fonts-firacode on Ubuntu 18.04. fonts-firacode is Monospaced font with programming ligatures

Introduction

In this tutorial we learn how to install fonts-firacode on Ubuntu 18.04.

What is fonts-firacode

fonts-firacode is:

Fira Code is an extension of the Fira Mono font containing a set of ligatures for common programming multi-character combinations. This is just a font rendering feature: underlying code remains ASCII-compatible. This helps to read and understand code faster. For some frequent sequences like .. or //, the ligatures allow one to correct spacing.

This font is expected to work in most text editors but won’t work in most (especially VTE-based) terminal emulators. A detailed list is available on https://github.com/tonsky/FiraCode#terminal-support

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

Install fonts-firacode Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install fonts-firacode

Install fonts-firacode Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install fonts-firacode

Install fonts-firacode 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install fonts-firacode

How To Uninstall fonts-firacode on Ubuntu 18.04

To uninstall only the fonts-firacode package we can use the following command:

sudo apt-get remove fonts-firacode

Uninstall fonts-firacode And Its Dependencies

To uninstall fonts-firacode and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove fonts-firacode

Remove fonts-firacode Configurations and Data

To remove fonts-firacode configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge fonts-firacode

Remove fonts-firacode configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge fonts-firacode

References

Summary

In this tutorial we learn how to install fonts-firacode package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.