How To Install ruby-github-linguist on Debian 12

Learn how to install ruby-github-linguist on Debian 12 with this tutorial. ruby-github-linguist is detection and highlight of the programming language of source code

Introduction

In this tutorial we learn how to install ruby-github-linguist on Debian 12.

What is ruby-github-linguist

ruby-github-linguist is:

Language detection: ruby-github-linguist defines a list of all languages known to GitHub in a yaml file. In order for a file to be highlighted, a language and a lexer must be defined there.

Syntax Highlighting: The actual syntax highlighting is handled by the Pygments wrapper, ruby-pygments.rb. It also provides a Lexer abstraction that determines which highlighter should be used on a file.

Stats: The Language stats bar that you see on every repository is built by aggregating the languages of each file in that repository. The top language in the graph determines the project’s primary language.

Ignore vendored files: Checking other code into your git repo is a common practice. But this often inflates your project’s language stats and may even cause your project to be labeled as another language. ruby-github-linguist is able to identify some of these files and directories and exclude them.

Generated file detection: Not all plain text files are true source files. Generated files like minified js and compiled CoffeeScript can be detected and excluded from language stats. As an extra bonus, these files are suppressed in diffs.

There are three methods to install ruby-github-linguist 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 ruby-github-linguist Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install ruby-github-linguist

Install ruby-github-linguist Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install ruby-github-linguist using apt by running the following command:

sudo apt -y install ruby-github-linguist

Install ruby-github-linguist 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 ruby-github-linguist using aptitude by running the following command:

sudo aptitude -y install ruby-github-linguist

How To Uninstall ruby-github-linguist on Debian 12

To uninstall only the ruby-github-linguist package we can use the following command:

sudo apt-get remove ruby-github-linguist

Uninstall ruby-github-linguist And Its Dependencies

To uninstall ruby-github-linguist and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove ruby-github-linguist

Remove ruby-github-linguist Configurations and Data

To remove ruby-github-linguist configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge ruby-github-linguist

Remove ruby-github-linguist configuration, data, and all of its dependencies

We can use the following command to remove ruby-github-linguist configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge ruby-github-linguist

Dependencies

ruby-github-linguist have the following dependencies:

References

Summary

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