Skip to main content

Flex Agent uninstall

Uninstalling the Flex Agent removes:

  • Agent symlinks and binaries: /usr/bin/contrast-flex and /usr/bin/contrast-flex-agent

  • Agent configuration files

  • The user created for the agent (if applicable)

Before you begin

  • Installation procedures require elevated permissions (root or equivalent). Use sudo for all commands.

  • After you uninstall the Flex Agent, restart your applications.

Uninstall Flex Agent with package manager

For installations that you manage with apt (Debian/Ubuntu) or yum (Red Hat/CentOS), use the package manager's built-in uninstall command. This is the recommended method as it handles dependencies and cleanup automatically. For example:

  • Debian/Ubuntu

    apt remove contrast-flex-agent -y
  • RedHat/CentoS

    yum remove contrast-flex-agent -y

Uninstall Flex Agent with a script

The Flex Agent package includes an uninstallation script located in /usr/bin/contrast-flex-agent/service/${version}/uninstall.sh (where $(version) represents the Flex Agent version you installed).

To run this script, use this command:

/usr/bin/contrast-flex-agent/service/${version}/uninstall.sh