How To Install dh-exec on Debian 10

Learn how to install dh-exec on Debian 10 with this tutorial. dh-exec is Scripts to help with executable debhelper files

Introduction

In this tutorial we learn how to install dh-exec on Debian 10.

What is dh-exec

dh-exec is:

Debhelper (in compat level 9 and above) allows its config files to be executable, and uses the output of such scripts as if it was the content of the config file.

To ease and standardize the most common tasks, this package provides a few solutions to help constructing such executable scripts:

  • A way to ease variable substitution, from environment variables or dpkg-architecture.
  • Ability to filter files by architecture or build profile, within a single debhelper control file.
  • An extension to dh_install and dh_installman, with the ability to rename files.

There are three methods to install dh-exec 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 dh-exec Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install dh-exec

Install dh-exec Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install dh-exec

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

sudo aptitude -y install dh-exec

How To Uninstall dh-exec on Debian 10

To uninstall only the dh-exec package we can use the following command:

sudo apt-get remove dh-exec

Uninstall dh-exec And Its Dependencies

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

sudo apt-get -y autoremove dh-exec

Remove dh-exec Configurations and Data

To remove dh-exec configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge dh-exec

Remove dh-exec configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge dh-exec

Dependencies

dh-exec have the following dependencies:

References

Summary

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