How To Install precious on Debian 12

Learn how to install precious on Debian 12 with this tutorial. precious is one code quality tool to rule them all

Introduction

In this tutorial we learn how to install precious on Debian 12.

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 Debian 12. 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 Debian. 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 Debian 12

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 Debian 12, we can use the command below:

sudo apt-get -y autoremove precious

Remove precious Configurations and Data

To remove precious configuration and data from Debian 12 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 Debian 12 using different package management tools: apt, apt-get and aptitude.