How To Install cgit on Debian 10

Learn how to install cgit on Debian 10 with this tutorial. cgit is hyperfast web frontend for git repositories written in C

Introduction

In this tutorial we learn how to install cgit on Debian 10.

What is cgit

cgit is:

This is an attempt to create a fast web interface for the Git SCM, using a built-in cache to decrease server I/O pressure.

Features:

  • basic repository browsing (logs, diffs, trees…)
  • caching of generated HTML
  • cloneable URLs (implements dumb HTTP transport)
  • commit feeds (atom format)
  • discovery of Git repositories
  • on-the-fly archives for tags and commits
  • plugin support for e.g. syntax highlighting
  • side-by-side diffs
  • simple time/author statistics
  • simple virtual hosting support (macro expansion)
  • understands GitWeb project-lists
  • understands gitweb.owner in Git config files
  • has extensive filtering framework using scripts or a built-in Lua interpreter

There are three methods to install cgit on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install cgit Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install cgit

Install cgit Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install cgit using apt by running the following command:

sudo apt -y install cgit

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

sudo aptitude -y install cgit

How To Uninstall cgit on Debian 10

To uninstall only the cgit package we can use the following command:

sudo apt-get remove cgit

Uninstall cgit And Its Dependencies

To uninstall cgit and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove cgit

Remove cgit Configurations and Data

To remove cgit configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge cgit

Remove cgit configuration, data, and all of its dependencies

We can use the following command to remove cgit configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge cgit

Dependencies

cgit have the following dependencies:

References

Summary

In this tutorial we learn how to install cgit package on Debian 10 using different package management tools: apt, apt-get and aptitude.