How To Install augeas-lenses on Ubuntu
Posted on April 1, 2023  (Last modified on May 20, 2023 )
2 minutes • 425 words
Introduction
In this tutorial we learn how to install augeas-lenses
on Ubuntu.
What is augeas-lenses
augeas-lenses is:
Augeas parses configuration files described in lenses into a tree structure, which it exposes through its public API. Changes made through the API are written back to the initially read files.
Lenses are the building blocks of the file <-> tree transformation; they combine parsing a file and building the tree (the get transformation), with turning the tree back into an (updated) file (the put transformation).
The transformation works very hard to preserve comments and formatting details. It is controlled by ``lens’’ definitions that describe the file format and the transformation into a tree. This package includes the official set of lenses.
There are three methods to install augeas-lenses
on Ubuntu. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install augeas-lenses Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install augeas-lenses
using apt-get
by running the following command:
sudo apt-get -y install augeas-lenses
Install augeas-lenses Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install augeas-lenses
using apt
by running the following command:
sudo apt -y install augeas-lenses
Install augeas-lenses 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 augeas-lenses
using aptitude
by running the following command:
sudo aptitude -y install augeas-lenses
How To Uninstall augeas-lenses on Ubuntu
To uninstall only the augeas-lenses
package we can use the following command:
sudo apt-get remove augeas-lenses
Uninstall augeas-lenses And Its Dependencies
To uninstall augeas-lenses
and its dependencies that are no longer needed by Ubuntu, we can use the command below:
sudo apt-get -y autoremove augeas-lenses
Remove augeas-lenses Configurations and Data
To remove augeas-lenses
configuration and data from Ubuntu we can use the following command:
sudo apt-get -y purge augeas-lenses
Remove augeas-lenses configuration, data, and all of its dependencies
We can use the following command to remove augeas-lenses
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge augeas-lenses
Dependencies
augeas-lenses have the following dependencies:
References
Summary
In this tutorial we learn how to install augeas-lenses
package on Ubuntu using different package management tools: apt, apt-get and aptitude.