[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ] [ next ]

Debian Packaging Manual - Chapter 10
Alternative versions of an interface - update-alternatives


When several packages all provide different versions of the same program or file it is useful to have the system select a default, but to allow the system administrator to change it and have their decisions respected.

For example, there are several versions of the vi editor, and there is no reason to prevent all of them from being installed at once, each under their own name (nvi, vim or whatever). Nevertheless it is desirable to have the name vi refer to something, at least by default.

If all the packages involved cooperate, this can be done with update-alternatives.

Each package provides its own version under its own name, and calls update-alternatives in its postinst to register its version (and again in its prerm to deregister it).

See the manpage update-alternatives(8) for details.

If update-alternatives does not seem appropriate you may wish to consider using diversions instead.


[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ] [ next ]
Debian Packaging Manual
version 3.1.1.1, 1999-11-22
Ian Jackson ijackson@gnu.ai.mit.edu
Revised: David A. Morris bweaver@debian.org
Maintainer: Christian Schwarz schwarz@debian.org
Maintainer: Manoj Srivastava srivasta@debian.org
Maintainer: The Debian Policy group debian-policy@lists.debian.org