How to Install, Update, and Uninstall Fonts in Linux

Get the look you really want

Linotype blocks assembles on a press

Pixabay 

Adding, removing, and managing fonts on the Linux desktop is simple, so long as you know where to put them.

Necessary Directories

The hidden .fonts file in a Linux file manager.

Linux supports two primary locations to place new fonts. The first location makes fonts available globally, 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 directoryis 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.

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. 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, press Ctrl+H. If you don’t see that directory, 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

Move your .ttf, .TTF, or .otf files into the correct directory. You'll have to work from a shell prompt to add global fonts because a standard user doesn’t have permission to move files into /usr/share/fonts/.

If you’ve downloaded a bunch of .ttf fonts into your user Download directory (/home/user/Downloads), moveve those fonts into the global directory by issuing the following command:

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

Next, make the system aware of the change by issuing the command:

sudo fc-cache -fv

When fc-cache completes, all users on the system enjoy access to the newly added global fonts.

Adding Microsoft Fonts

ttf installer

Microsoft makes several of its licensed fonts—Andale Mono, Arial, Arial Black, Comic Sans MS, Courier New, Georgia, Impact, Times New Roman, Trebuchet, Verdana, and Webdings—available to Linux desktops through the TTF-MSCoreFonts-Installer package.

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

Microsoft's package depends on several Python3 packages.

Adding Google Fonts

The TypeCatcher Google web fonts installer.

Google offers a large number of web fonts for desktop use. To add them to the Linux desktop, install the TypeCatcher program through your package manager.

AfterTypeCatcher is installed, 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

Uninstall a font by deleting its file from the appropriate folder.

When you remove a global font, issue the following command to update the system's font cache:

sudo fc-cache -fv

To remove the Microsoft Core Fonts package, run:

sudo apt remove ttf-mscorefonts-installer

Making Applications Aware of New Fonts

Because applications scan for changes to fonts every time they're opened, simply closing then re-launching an application is sufficient to reveal newly installed fonts within that application.