How To Install localepurge on Ubuntu 22.04

In this tutorial we learn how to install localepurge on Ubuntu 22.04. localepurge is reclaim disk space by removing unneeded localizations

Introduction

In this tutorial we learn how to install localepurge on Ubuntu 22.04.

What is localepurge

localepurge is:

This package provides a script to recover disk space wasted for unneeded locales, GNOME/KDE localizations and localized man pages. Depending on the installation, it is possible to save hundreds of megabytes of disk space taken up by localization you will most probably never have any use for. It is run automatically upon completion of any APT installation actions.

This tool is a hack which is not integrated with the system’s package management system and therefore is not for the faint of heart. Its interference can provoke strange, but usually harmless, behavior in programs related to apt/dpkg, such as dpkg-repack, reportbug, etc. Responsibility for its usage and possible breakage of the system therefore lies in the system administrator’s hands.

Please do abstain from reporting any such bugs blaming localepurge if you break the system by using it. If you don’t know what you are doing and can’t handle any resulting breakage, you should not install this package.

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

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

sudo apt-get update

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

sudo apt-get -y install localepurge

Install localepurge Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install localepurge

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

sudo aptitude -y install localepurge

How To Uninstall localepurge on Ubuntu 22.04

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

sudo apt-get remove localepurge

Uninstall localepurge And Its Dependencies

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

sudo apt-get -y autoremove localepurge

Remove localepurge Configurations and Data

To remove localepurge configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge localepurge

Remove localepurge configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge localepurge

References

Summary

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