How To Install makepatch on Ubuntu 22.04

In this tutorial we learn how to install makepatch on Ubuntu 22.04. makepatch is generate/apply patch files with more functionality than plain diff

Introduction

In this tutorial we learn how to install makepatch on Ubuntu 22.04.

What is makepatch

makepatch is:

This package contains a pair of programs, makepatch and applypatch, to assist in the generation and application of patch kits to synchronise source trees.

makepatch knows about common conventions for patch kits (it generates Index: and Prereq: lines, it patches patchlevel.h first, it can use manifest files), plus it prepends some shell code which if run will take care adding directories, removing files, setting execute mode on scripts, and the like.

applypatch uses some extra data supplied by makepatch to verify both the patch and the source directory before applying the patch. Afterwards it will clean up the directory tree plus fix up the permissions and even the timestamps on the patched files.

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

Install makepatch Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install makepatch

Install makepatch Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install makepatch

Install makepatch 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install makepatch

How To Uninstall makepatch on Ubuntu 22.04

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

sudo apt-get remove makepatch

Uninstall makepatch And Its Dependencies

To uninstall makepatch and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove makepatch

Remove makepatch Configurations and Data

To remove makepatch configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge makepatch

Remove makepatch configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge makepatch

References

Summary

In this tutorial we learn how to install makepatch package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.