Skip to content

sentinelone_uninstall_linux.sh

Corey Watson edited this page Dec 1, 2025 · 1 revision

sentinelone_uninstall_linux.sh

Uninstalls SentinelOne agent from Linux systems using the sentinelctl command.

Overview

This script provides a simple and reliable method to uninstall the SentinelOne agent from Linux systems. It uses the native sentinelctl command-line utility to perform the removal and includes appropriate validation checks.

Purpose

Automates the uninstallation of the SentinelOne agent on Linux systems. The script verifies root privileges and the presence of the sentinelctl utility before attempting removal, ensuring a clean and reliable uninstallation process.

Prerequisites

  • Root privileges (sudo access)
  • SentinelOne agent must be installed
  • sentinelctl command must be available (typically in /usr/local/bin or /opt/sentinelone/bin)

Configuration

Required Inputs

No configuration required. The script automatically detects and uses the sentinelctl utility.

Behavior

  1. Validates script is running as root
  2. Checks for presence of sentinelctl command
  3. Executes sentinelctl uninstall command
  4. Reports success or failure status
  5. Exits with appropriate exit code

Security Notes

  • Requires root privileges for agent removal
  • May require disabling tamper protection from SentinelOne console before uninstallation
  • No secrets or sensitive data logged

Exit Codes

  • 0: Success - SentinelOne agent uninstalled successfully
  • 1: Failure - Missing privileges, agent not found, or uninstall failed

Example Output

[ SENTINELONE UNINSTALL ]
--------------------------------------------------------------
Starting SentinelOne agent uninstallation...

Permissions : root

sentinelctl found : yes

Running uninstall command...

[ SUCCESS ]
--------------------------------------------------------------
SentinelOne agent uninstalled successfully

Version History

  • 1.0.0 - Initial release

Links

Clone this wiki locally