Software & AppsOperating SystemLinux

How To Remove Unused Fonts from LibreOffice and Linux

Ubuntu 1

If you’re using LibreOffice and Linux, you might have noticed a plethora of fonts that you never use. These unused fonts can clutter your system and slow down the loading times of applications. In this guide, we’ll walk you through how to remove these unused fonts from both LibreOffice and Linux.

Quick Answer

To remove unused fonts from LibreOffice and Linux, you can use a graphical interface tool like font-manager, remove fonts manually through the command line, or delete font files from specific directories. It is also possible to remove fonts installed system-wide or for your user only. However, always exercise caution when removing fonts, as some may be dependencies for other packages.

Understanding the Basics

Before we start, it’s important to understand that fonts in Linux are stored in specific directories. The most common directories are /usr/share/fonts, /usr/local/share/fonts, /home/$USER/.local/share/fonts, and /home/$USER/.fonts.

Removing Fonts Through a Graphical Interface

If you prefer a graphical interface, you can use the font-manager tool.

  1. Install the font-manager tool: Use the following command to install the font-manager tool:
sudo aptitude install font-manager

This command uses sudo to run the command as an administrator, aptitude to manage packages, and install to install the font-manager tool.

  1. Launch font-manager and disable fonts: After installing, launch the font-manager and disable the fonts you want to remove. Disabling fonts will make them disappear for you, but other users on the system will still see them.

Removing Fonts Manually from Ubuntu Software Center

If you’re using Ubuntu, you can remove fonts directly from the Ubuntu Software Center.

  1. Open Ubuntu Software Center and search for fonts.
  2. Delete the fonts you want to remove.

Removing Fonts as Packages Through Command Line

You can also remove fonts as packages through the command line. This is especially useful for removing non-English fonts.

  1. Use the command sudo apt-get remove: This command is followed by the font package names. For example:
sudo apt-get remove ttf-indic-fonts-core ttf-kacst-one ttf-khmeros-core ttf-lao ttf-punjabi-fonts ttf-takao-pgothic ttf-thai-tlwg ttf-unfonts-core ttf-wqy-microhei

This command uses sudo to run the command as an administrator, apt-get to handle packages, and remove to remove the specified font packages.

  1. Find a list of all font packages: You can find a list of all font packages on the Ubuntu Packages website. Add the font package names to the command above to include them for removal.

Removing Fonts Manually Through Command Line

You can also remove fonts manually through the command line.

  1. Open the file /etc/fonts/fonts.conf: This file will show you where fonts are stored.
  2. Remove the fonts from the respective directory: With admin privileges, remove the fonts from the respective directory. They should then disappear from any location.

Removing Fonts Installed System-wide

If a font was installed system-wide, you can remove it by following these steps:

  1. Open Nautilus as root: Press Alt+F2 and enter gksudo nautilus.
  2. Navigate to /usr/share/fonts/truetype and delete the font file.
  3. Update the font cache: Run sudo fc-cache -f -v in the terminal to update the font cache. This command uses sudo to run the command as an administrator, fc-cache to manage the font cache, -f to force the cache to be rebuilt, and -v to display information about the cache update.
  4. Log out and log back in: For the changes to take effect, log out and log back in.

Removing Fonts Installed for Your User Only

If a font was installed only for your user, you can remove it by manually deleting the font file from the ~/.fonts or ~/.local/share/fonts/ directory. Then, log out and log back in for the changes to take effect.

Checking and Removing Installed Fonts on Debian/Ubuntu Systems

To check and remove installed fonts on Debian/Ubuntu systems, follow these steps:

  1. Check installed fonts: Use the following command to check installed fonts:
echo dpkg -l fonts\*|grep ii|awk '{print $2}'|grep -vE 'fonts-(noto$|liberation|dejavu|freefont|hack)'

This command uses echo to output the result, dpkg -l fonts\* to list all font packages, grep ii to filter the installed packages, awk '{print $2}' to print the second column (which is the package name), and grep -vE 'fonts-(noto$|liberation|dejavu|freefont|hack)' to exclude some common fonts.

  1. Save the list of font packages to a file: Use > not-needed-font-packages.txt to save the list of font packages to a file.
  2. Test the system response to removing the fonts: Run sudo dpkg --remove --dry-run $(cat not-needed-font-packages.txt) to test the system response to removing the fonts.
  3. Remove the unnecessary packages: Run sudo dpkg --remove --force-all $(cat not-needed-font-packages.txt) to remove the unnecessary packages.
  4. Refresh the font cache: Run fc-cache -fv to refresh the font cache.

Removing Non-Western Font Families on Ubuntu 16.04

To remove non-western font families on Ubuntu 16.04, run the following command:

sudo apt remove fonts-lao fonts-lklug-sinhala fonts-sil-abyssinica fonts-sil-padauk fonts-tibetan-machine fonts-thai-tlwg fonts-lohit-guru fonts-guru-extra

To remove the Stix math symbol font family, run sudo apt remove fonts-stix.

Conclusion

Removing unused fonts from LibreOffice and Linux can help declutter your system and improve loading times. However, always exercise caution when removing fonts, as some may be dependencies for other packages. Always review the list of packages to be removed before proceeding. Happy font management!

Can removing unused fonts improve the performance of my system?

Yes, removing unused fonts can help improve the performance of your system by reducing the number of fonts that need to be loaded during startup and when using applications.

How can I remove fonts using the font-manager tool?

To remove fonts using the font-manager tool, launch the tool and disable the fonts you want to remove. Disabling fonts will make them disappear for you, but other users on the system will still see them.

How can I remove fonts from the Ubuntu Software Center?

To remove fonts from the Ubuntu Software Center, open the software center and search for fonts. From there, you can delete the fonts you want to remove.

Can I remove fonts manually through the command line?

Yes, you can remove fonts manually through the command line. You can open the file /etc/fonts/fonts.conf to see where fonts are stored and then remove the fonts from the respective directory using admin privileges.

How can I remove fonts that were installed system-wide?

To remove fonts that were installed system-wide, you can open Nautilus as root by pressing Alt+F2 and entering gksudo nautilus. Then navigate to /usr/share/fonts/truetype and delete the font file. After that, run sudo fc-cache -f -v in the terminal to update the font cache. Finally, log out and log back in for the changes to take effect.

How can I remove fonts that were installed for my user only?

To remove fonts that were installed for your user only, you can manually delete the font file from the ~/.fonts or ~/.local/share/fonts/ directory. After that, log out and log back in for the changes to take effect.

How can I check and remove installed fonts on Debian/Ubuntu systems?

To check and remove installed fonts on Debian/Ubuntu systems, you can use the command echo dpkg -l fonts\*|grep ii|awk '{print $2}'|grep -vE 'fonts-(noto$|liberation|dejavu|freefont|hack)' to list all font packages. Then, save the list of font packages to a file using > not-needed-font-packages.txt. Next, test the system response to removing the fonts by running sudo dpkg --remove --dry-run $(cat not-needed-font-packages.txt). Finally, remove the unnecessary packages with sudo dpkg --remove --force-all $(cat not-needed-font-packages.txt) and refresh the font cache with fc-cache -fv.

How can I remove non-western font families on Ubuntu 16.04?

To remove non-western font families on Ubuntu 16.04, you can run the command sudo apt remove fonts-lao fonts-lklug-sinhala fonts-sil-abyssinica fonts-sil-padauk fonts-tibetan-machine fonts-thai-tlwg fonts-lohit-guru fonts-guru-extra. If you want to remove the Stix math symbol font family, run sudo apt remove fonts-stix.

Leave a Comment

Your email address will not be published. Required fields are marked *