How To Install precious on Ubuntu
Posted on April 1, 2023  (Last modified on May 20, 2023 )
3 minutes • 431 words
Introduction
In this tutorial we learn how to install precious on Ubuntu.
What is precious
precious is:
Precious is a command-line tool to unify the execution of source code tidiers and validators.
With Precious you can configure
all of your code quality tool rules in one place
and easily run precious from your commit hooks and in CI.
Several tidier+validator unifiers/orchestraters exists, including perl-based TidyAll (the predecessor of Precious), Python-based pre-commit, Go-based lefthook, NodeJS-based husky and lint-staged, and Ruby-based overcommit. For comparison, Precious is Rust-based with these notable features:
- handles directory-wide and project-wide tasks (unlike TidyAll)
- stores task settings locally (unlike pre-commit)
- cannot cache tasks (unlike TidyAll)
- supports incremental linting (unlike lefthook, husky, lint-staged or overcommit)
For a more detailed comparison, see https://blog.urth.org/2020/05/08/comparing-code-quality-meta-tools/.
There are three methods to install precious 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 precious Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install precious using apt-get by running the following command:
sudo apt-get -y install precious
Install precious Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install precious using apt by running the following command:
sudo apt -y install precious
Install precious 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 precious using aptitude by running the following command:
sudo aptitude -y install precious
How To Uninstall precious on Ubuntu
To uninstall only the precious package we can use the following command:
sudo apt-get remove precious
Uninstall precious And Its Dependencies
To uninstall precious and its dependencies that are no longer needed by Ubuntu, we can use the command below:
sudo apt-get -y autoremove precious
Remove precious Configurations and Data
To remove precious configuration and data from Ubuntu we can use the following command:
sudo apt-get -y purge precious
Remove precious configuration, data, and all of its dependencies
We can use the following command to remove precious configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge precious
Dependencies
precious have the following dependencies:
References
Summary
In this tutorial we learn how to install precious package on Ubuntu using different package management tools: apt, apt-get and aptitude.