Forrest logo
back to the update-alternatives tool

update-alternatives:tldr:15f62

update-alternatives: Remove a symbolic link.
$ sudo update-alternatives --remove ${java} ${-opt-java-jdk1-8-0_102-bin-java}
try on your machine

This command is used to remove an alternative option for the Java Runtime Environment (JRE) in a Linux system.

Here is the breakdown of each part of the command:

  • sudo: The "sudo" command is used to execute the following command with administrative privileges (superuser/root access). It prompts the user to enter their password before executing the command.

  • update-alternatives: This is a command-line tool in Linux that allows you to manage alternative programs that satisfy the same dependency. In this case, it is used to manage the Java alternatives available on the system.

  • --remove: This option tells the "update-alternatives" command to remove an existing alternative.

  • ${java}: This is a placeholder variable, and its value represents the name or path of the alternative option for the Java program. It could be the name of a symbolic link or an actual file path.

  • ${-opt-java-jdk1-8-0_102-bin-java}: This is another placeholder variable representing the name or path of the alternative option to be removed. It could be the name of a symbolic link or an actual file path.

To summarize, the command is likely removing a specific alternative Java option (specified by the placeholder variables) from the system using administrative privileges.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the update-alternatives tool