OS Manuals

/usr/bin/update-alternatives

The Debian Package Manager

From dpkg 1.23.11-r3 (os), captured 2026-11-05 by running update-alternatives --help (exit 0). permalink

Usage: update-alternatives [<option>...] <command>

Commands:
      --install <link> <name> <path> <priority>
        [--slave <link> <name> <path>]...
          Add a group of alternatives to the system.
      --remove <name> <path>
          Remove <path> from the <name> group alternative.
      --remove-all <name>
          Remove <name> group from the alternatives system.
      --auto <name>
          Switch the master link <name> to automatic mode.
      --display <name>
          Display information about the <name> group.
      --query <name>
          Machine parseable version of --display <name>.
      --list <name>
          Display all targets of the <name> group.
      --get-selections
          List master alternative names and their status.
      --set-selections
          Read alternative status from standard input.
      --config <name>
          Show alternatives for the <name> group and ask the user to select
          which one to use.
      --set <name> <path>
          Set <path> as alternative for <name>.
      --all
          Call --config on all alternatives.

<link> is the symbolic link pointing to /etc/alternatives/<name>.
  (e.g. /usr/bin/pager)
<name> is the master name for this link group.
  (e.g. pager)
<path> is the location of one of the alternative target files.
  (e.g. /usr/bin/less)
<priority> is an integer; options with higher numbers have higher priority in
  automatic mode.

Options:
      --skip-auto
          Skip prompt for alternatives correctly configured in automatic mode
          (relevant for --config only).
      --force
          Allow replacing files with alternative links.
      --quiet
          Enable quiet mode, minimal output.
      --verbose
          Enable verbose mode, more output.
      --debug
          Enable debugging mode, way more output.
      --log <file>
          Change the log file.
      --altdir <directory>
          Change the alternatives directory.
          [default: /etc/alternatives]
      --admindir <directory>
          Change the administrative directory.
          [default: /var/lib/dpkg/alternatives]
          [env: DPKG_ADMINDIR=]
      --instdir <directory>
          Change the installation directory.
          [default: /]
          [env: DPKG_ROOT=]
      --root <directory>
          Change the filesystem root directory.
          [default: /]
      --help
          Show this help message.
      --version
          Show the version.
Options (21)
OptionDescriptionSource
--remove-all nameRemove <name> group from the alternatives system.help
--auto nameSwitch the master link <name> to automatic mode.help
--display nameDisplay information about the <name> group.help
--query nameMachine parseable version of --display <name>.help
--list nameDisplay all targets of the <name> group.help
--get-selectionsList master alternative names and their status.help
--set-selectionsRead alternative status from standard input.help
--config nameShow alternatives for the <name> group and ask the user to select which one to use.help
--allCall --config on all alternatives.help
--skip-autoSkip prompt for alternatives correctly configured in automatic mode (relevant for --config only).help + man
--forceAllow replacing or dropping any real file that is installed where an alternative link has to be installed or removed.help + man
--quietDo not generate any comments unless errors occur.help + man
--verboseGenerate more comments about what is being done.help + man
--debugGenerate even more comments, helpful for debugging, about what is being done.help + man
--log fileSpecifies the log file, when this is to be different from the default (/var/log/alternatives.log).help + man
--altdir directorySpecifies the alternatives directory, when this is to be different from the default.help + man
--admindir directorySpecifies the administrative directory, when this is to be different from the default.help + man
--instdir directorySpecifies the installation directory where alternatives links will be created.help + man
--root directoryChange the filesystem root directory.help + man
--helpShow this help message.help
--versionShow the version.help
Exit status (2) from the manual page
0The requested action was successfully performed.
2Problems were encountered whilst parsing the command line or performing the action.
Examples (3) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.