How To Install highlight.js-doc on Debian 12

Learn how to install highlight.js-doc on Debian 12 with this tutorial. highlight.js-doc is JavaScript library for syntax highlighting - documentation

Introduction

In this tutorial we learn how to install highlight.js-doc on Debian 12.

What is highlight.js-doc

highlight.js-doc is:

Highlight.js is a JavaScript library which automatically detects the language of code blocks in a web page, and provides syntax highlighting for them. The library supports more than fifty languages and is bundled with more than twenty style themes.

This package contains the documentation of this library.

There are three methods to install highlight.js-doc 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 highlight.js-doc Using apt-get

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

sudo apt-get update

After updating apt database, We can install highlight.js-doc using apt-get by running the following command:

sudo apt-get -y install highlight.js-doc

Install highlight.js-doc Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install highlight.js-doc using apt by running the following command:

sudo apt -y install highlight.js-doc

Install highlight.js-doc 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 highlight.js-doc using aptitude by running the following command:

sudo aptitude -y install highlight.js-doc

How To Uninstall highlight.js-doc on Debian 12

To uninstall only the highlight.js-doc package we can use the following command:

sudo apt-get remove highlight.js-doc

Uninstall highlight.js-doc And Its Dependencies

To uninstall highlight.js-doc and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove highlight.js-doc

Remove highlight.js-doc Configurations and Data

To remove highlight.js-doc configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge highlight.js-doc

Remove highlight.js-doc configuration, data, and all of its dependencies

We can use the following command to remove highlight.js-doc configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge highlight.js-doc

Dependencies

highlight.js-doc have the following dependencies:

References

Summary

In this tutorial we learn how to install highlight.js-doc package on Debian 12 using different package management tools: apt, apt-get and aptitude.