---
name: "dh_installalternatives"
section: "1"
platform: "linux"
package: "debhelper"
version: "13.24.2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dh_installalternatives"
---

# dh\_installalternatives(1)

install declarative alternative rules

## NAME

dh\_installalternatives - install declarative alternative rules

## SYNOPSIS

**dh\_installalternatives** \[*debhelper options*\]

## DESCRIPTION

**dh\_installalternatives** is a debhelper program that is responsible for parsing the declarative alternatives format and insert the relevant maintscripts snippets to interface with [**update-alternatives**(1)](/update-alternatives/1.md)

## FILES

- debian/*package*.alternatives

  An example of the format:

  ```
      Name: editor
      Link: /usr/bin/editor
      Alternative: /usr/bin/vim.basic
      Dependents:
        /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/vim.1.gz
        /usr/share/man/fr/man1/editor.1.gz editor.fr.1.gz /usr/share/man/fr/man1/vim.1.gz
        /usr/share/man/it/man1/editor.1.gz editor.it.1.gz /usr/share/man/it/man1/vim.1.gz
        /usr/share/man/pl/man1/editor.1.gz editor.pl.1.gz /usr/share/man/pl/man1/vim.1.gz
        /usr/share/man/ru/man1/editor.1.gz editor.ru.1.gz /usr/share/man/ru/man1/vim.1.gz
      Priority: 50
  ```

  The fields **Link**, **Name**, **Alternative**, and **Priority** are mandatory and correspond to the [**update-alternatives**(1)](/update-alternatives/1.md) **--install** parameters **link**, **name**, **path**, and **priority** respectively.

  The **Dependents** field is optional and consists of one or more lines. Each non-empty line must contain exactly 3 space separated values that match (in order) the values passed to the **--slave** parameter for [**update-alternatives**(1)](/update-alternatives/1.md).

## OPTIONS

- **-n**, **--no-scripts**

  Do not modify *postinst*/*postrm*/*prerm* scripts.

## SEE ALSO

[**debhelper**(7)](/debhelper/7.md)

This program is a part of debhelper.
