How to Install, Update, and Uninstall Fonts in Linux

Get the look you really want

Linotype blocks assembles on a press


Back in the mid-to-late ‘90s, the Linux GUI suffered from a number of issues, one of which was fonts. When the Linux desktop first arrived on the scene, not only did it lack things like anti-aliasing, but the addition of fonts to the desktop was a convoluted mess.

Fast forward to now and that problem has all but gone away. Now, adding, removing, and managing fonts on the Linux desktop is incredibly simple, so long as you know where to put them and/or what tools are available. Let's add some fonts!

Necessary Directories

The hidden .fonts file in a Linux file manager.

It is important to understand that there are two primary locations to place new fonts. The first location makes fonts available globally. This is important if you have a Linux desktop or server that is used by multiple people. So if more than one person logs into your Linux server, and wants to have access to more than the standard font, the directory for those fonts is /usr/share/fonts. Within that directory you’ll find five subdirectories, three of which are important:

  • /usr/share/fonts/opentype
  • /usr/share/fonts/truetype
  • /usr/share/fonts/truetype1

The first directory (opentype) is where you place opentype fonts. These fonts generally have the .otf file extension. The second and third directories house truetype fonts, which typically end in .ttf (or .TTF).

The second directory, for user-specific fonts, is found in /home/USER/.fonts (Where USER is the actual username). Fonts stored in this directory can only be used by that particular user. It is of note that not all Linux distributions create this directory by default. If you open your file manager, you’ll need to instruct it to display hidden directories (directories which start with a dot). For most file managers, this can be done with the [Ctrl]+[h] key combination. If you don’t see that directory, you can create it by either right-clicking in your file manager and selecting New > Folder, or you can open a terminal window and issue the command:

mkdir ~/.fonts

There is no need to create subfolders to house opentype and truetype fonts, as they will all be housed within that same directory.

Adding Fonts

To add new fonts you must first (legally) procure the fonts in question. Once you have them, you can then move the .ttf, .TTF, or .otf files into the correct directory. Say you want those fonts added globally. For that you’ll want to work from the command line (as the standard user doesn’t have permission to move files into /usr/share/fonts/).

Let’s say you’ve downloaded a bunch of .ttf fonts into your user Download directory (/home/USER/Downloads, where USER is your username). If you want to move those fonts into the global directory, open a terminal window and issue the following command:

sudo mv ~/Downloads/*.ttf /usr/share/fonts/truetype/

Once you’ve done that, you need to make the system aware of the change by issuing the command:

sudo fc-cache -fv

With that command executed, all users will have access to the newly added fonts.

To add those downloaded fonts to a specific user, you could work through the graphical file manager like so:

  1. Open the file manager.
  2. Navigate to the Downloads folder.
  3. Select all of the downloaded font files.
  4. Copy the files with the [Ctrl]+[c] keyboard combination.
  5. Navigate into the /home/USER/.fonts directory (where USER is the actual username).
  6. Paste the files with the [Ctrl]+[v] keyboard combination.

A quicker method would be:

  1. Open a terminal window.
  2. Issue the command mv ~/Downloads/*.ttf ~/.fonts.

What About Microsoft Fonts

There are certain instances where you will need a particular font that is licensed by Microsoft. Such fonts are: Andale Mono, Arial, Arial Black, Comic Sans MS, Courier New, Georgia, Impact, Times New Roman, Trebuchet, Verdana, and Webdings. If you need these fonts, you have to install a third-party application. Here's how to do this on the Ubuntu Desktop distribution:

  1. Open a terminal window.
  2. Issue the command sudo apt-get install ttf-mscorefonts-installer.
  3. When prompted, okay the license for the fonts.

These fonts will be added to the global directory and the installation will automatically update the font cache for you.

What About Google Fonts

The TypeCatcher Google web fonts installer.

Google has created a large number of web fonts that are available to all desktop users. To add them to the Linux desktop, you must install a third-party app, called TypeCatcher. To do this, follow these steps (again, demonstrating on Ubuntu Desktop):

  1. Open a terminal window.
  2. Issue the command sudo apt-get install typecatcher.
  3. Allow the installation to complete.

Once TypeCatcher is installed, open it from your desktop menu. From the main menu, search for the font you want to install, and then click the download button (downward pointing arrow in the upper left corner). After you’ve downloaded all the Google web fonts you want, you still have to update the font cache with the command sudo fc-cache -fv. When that command completes, all the Google fonts will be available to your applications and to all users.

How to Uninstall Fonts

Removing fonts is done in the reverse of adding fonts. If you’re removing user-specific fonts, you would simply open your file manager, navigate to the /home/USER/.fonts directory (Where USER is the actual username), select all the fonts to be removed, and hit the Delete key on your keyboard.

To remove global fonts, do the following:

  1. Open a terminal window. Change into the necessary directory with the command cd /usr/share/fonts/truetype.
  2. Issue the command ls|less and scroll through the listing, making note of the file names to be removed.
  3. Issue the command sudo rm FILENAME (Where FILENAME is the name of the font file to be removed).
  4. Issue the command sudo fc-cache -fv to update the font cache.

If you want to remove the Microsoft Core Fonts package, you can so with the command:

sudo apt-get remove ttf-mscorefonts-installer

Making Applications Aware of New Fonts

This is pretty simple. The easiest way to make an application aware of new fonts is to close it and re-open it. Make sure to save any/all work you’ve done before closing the application. This task holds true if you’ve added fonts globally or on a per-user basis. Of course, if those newly-added fonts still do not show up in either applications or in the desktop configuration options, you can always log out of the desktop and log back in. That will certainly make all applications aware of the newly-added fonts.