How To Install less on Debian 11

In this tutorial we learn how to install less on Debian 11. less is pager program similar to more

Introduction

In this tutorial we learn how to install less on Debian 11.

What is less

less is:

This package provides “less”, a file pager (that is, a memory-efficient utility for displaying text one screenful at a time). Less has many more features than the basic pager “more”. As part of the GNU project, it is widely regarded as the standard pager on UNIX-derived systems.

Also provided are “lessecho”, a simple utility for ensuring arguments with spaces are correctly quoted; “lesskey”, a tool for modifying the standard (vi-like) keybindings; and “lesspipe”, a filter for specific types of input, such as .doc or .txt.gz files.

There are three methods to install less on Debian 11. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install less Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install less

Install less Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install less

Install less 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install less

How To Uninstall less on Debian 11

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

sudo apt-get remove less

Uninstall less And Its Dependencies

To uninstall less and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove less

Remove less Configurations and Data

To remove less configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge less

Remove less configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge less

Dependencies

less have the following dependencies:

References

Summary

In this tutorial we learn how to install less package on Debian 11 using different package management tools: apt, apt-get and aptitude.