How To Install locales on Ubuntu 20.04

In this tutorial we learn how to install locales on Ubuntu 20.04. locales is GNU C Library GNU C Library

Introduction

In this tutorial we learn how to install locales on Ubuntu 20.04.

What is locales

locales is:

Machine-readable data files, shared objects and programs used by the C library for localization (l10n) and internationalization (i18n) support.

This package contains tools to generate locale definitions from source files (included in this package). It allows you to customize which definitions actually get generated. This is a space-saver over how this package used to be, with all locales generated by default. This created a package that unpacked to an excess of 30 megs. Task: minimal Original-Vcs-Browser: https://salsa.debian.org/glibc-team/glibc Original-Vcs-Git: https://salsa.debian.org/glibc-team/glibc.git

Package: locales Architecture: all Version: 2.31-0ubuntu9 Priority: important Section: libs Source: glibc Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: GNU Libc Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 17196 Depends: libc-bin (» 2.31), debconf (>= 0.5) | debconf-2.0 Breaks: libc-bin (« 2.23) Replaces: libc-bin (« 2.23), manpages-fr-extra (« 20141022) Filename: pool/main/g/glibc/locales_2.31-0ubuntu9_all.deb Size: 3869800 MD5sum: 6f80578c63cd65cc99ecc2d2d90b56f8 SHA1: 2df7cab444d32e587e16d9792ee48fd21207ab73 SHA256: 76fc6370a7fc1155bddf3a68752470500bd470ddc5bd1f544cb41748da23f60f Homepage: https://www.gnu.org/software/libc/libc.html Description-en: GNU C Library: National Language (locale) data [support] Machine-readable data files, shared objects and programs used by the C library for localization (l10n) and internationalization (i18n) support.

This package contains tools to generate locale definitions from source files (included in this package). It allows you to customize which definitions actually get generated. This is a space-saver over how this package used to be, with all locales generated by default. This created a package that unpacked to an excess of 30 megs. Task: minimal

There are three methods to install locales on Ubuntu 20.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 locales Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install locales

Install locales Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install locales using apt by running the following command:

sudo apt -y install locales

Install locales 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 locales using aptitude by running the following command:

sudo aptitude -y install locales

How To Uninstall locales on Ubuntu 20.04

To uninstall only the locales package we can use the following command:

sudo apt-get remove locales

Uninstall locales And Its Dependencies

To uninstall locales and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove locales

Remove locales Configurations and Data

To remove locales configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge locales

Remove locales configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge locales

References

Summary

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