How To Install git-filter-repo on Debian 12

Learn how to install git-filter-repo on Debian 12 with this tutorial. git-filter-repo is Quickly rewrite git repository history

Introduction

In this tutorial we learn how to install git-filter-repo on Debian 12.

What is git-filter-repo

git-filter-repo is:

git filter-repo is a versatile tool for rewriting history, which includes capabilities not found anywhere else. It roughly falls into the same space of tool as git filter-branch but without the capitulation-inducing poor performance, with far more capabilities, and with a design that scales usability-wise beyond trivial rewriting cases. git filter-repo is now recommended by the git project instead of git filter-branch.

While most users will probably just use filter-repo as a simple command line tool (and likely only use a few of its flags), at its core filter-repo contains a library for creating history rewriting tools. As such, users with specialized needs can leverage it to quickly create entirely new history rewriting tools.

There are three methods to install git-filter-repo 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 git-filter-repo Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install git-filter-repo

Install git-filter-repo Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install git-filter-repo using apt by running the following command:

sudo apt -y install git-filter-repo

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

sudo aptitude -y install git-filter-repo

How To Uninstall git-filter-repo on Debian 12

To uninstall only the git-filter-repo package we can use the following command:

sudo apt-get remove git-filter-repo

Uninstall git-filter-repo And Its Dependencies

To uninstall git-filter-repo and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove git-filter-repo

Remove git-filter-repo Configurations and Data

To remove git-filter-repo configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge git-filter-repo

Remove git-filter-repo configuration, data, and all of its dependencies

We can use the following command to remove git-filter-repo configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge git-filter-repo

Dependencies

git-filter-repo have the following dependencies:

References

Summary

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