Skip to main content

Platform | Offboarding Liongard Environment(s)

Updated yesterday

Overview πŸ’₯

Offboarding a Liongard environment is the final and irreversible step when a customer is no longer managed or when an environment was created in error. Proper offboarding ensures:

  • πŸ” No unauthorized data collection continues

  • 🧹 All inspectors, agents, and integrations are cleanly removed

  • πŸ“‰ Historical data is securely deleted

  • πŸ›‘οΈ Your Liongard instance remains accurate and compliant

This article provides a complete, step-by-step guide covering:

  • Standard UI-based offboarding (recommended)

  • Integration cleanup

  • Agent uninstallation (manual and scripted)

  • Advanced API-based environment deletion

  • Validation and post-offboarding checks


Why Offboarding Is Required πŸ€”

You should offboard a Liongard environment when:

  • A customer contract ends

  • Devices are decommissioned or sold

  • A tenant or environment was onboarded incorrectly

  • You need to permanently remove all collected data

⚠️ Important
Deleting an environment permanently removes:

  • All inspectors and agents

  • All historical metrics and snapshots

  • All environment-level configurations
    This action cannot be undone.


Offboarding Flow πŸ—’οΈ

Disable Integrations
↓
Delete Environment (UI)
↓
Remove Agents from Devices
↓
Validate Cleanup
↓
(Optional) API Deletion if UI Fails

Steps To Resolve πŸ§‘β€πŸ«

Step 1: Delete the Environment (UI Method – Recommended)

  1. Log in to Liongard

  2. Navigate to Admin β†’ Environments

  3. Locate the environment you want to offboard

  4. Click the red trashcan icon in the Actions column

  5. Review the confirmation prompt

  6. Confirm the deletion

⚠️ Warning
This step permanently deletes the environment and all associated data.

Step 2: Remove Integration Mappings

Before or immediately after deleting the environment, remove all external mappings.

Common Integrations to Review

Integration Type

Examples

Documentation

IT Glue, Hudu

Ticketing

ConnectWise, Autotask, Syncro

API Integrations

Custom or internal tools

Steps

  1. Navigate to Admin β†’ Integrations

  2. Open each configured integration

  3. Remove Environment mappings

βœ… This prevents failed sync attempts and noisy alerts.

Step 3: Uninstall Liongard Agents from Devices

Agents do not automatically uninstall when an environment is deleted.

Option A: Manual Uninstallation

  1. Log in to the device

  2. Open Programs & Features

  3. Uninstall Liongard Agent or RoarAgent

Option B: Automated Uninstallation (Recommended for Scale)

Use the following PowerShell script via:

  • RMM

  • Group Policy

  • Endpoint management tools

Click here to expand the script πŸ—’οΈ

#Application variables
$application = Get-WmiObject -Class Win32_Product -Filter "Name = 'Liongard Agent'"
$application2 = Get-WmiObject -Class Win32_Product -Filter "Name = 'RoarAgent'"

# Check and run as Administrator
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "You do not have Administrator rights to run this script. Please rerun this script as an Administrator!"
Exit
}

# Uninstall installations if found
if ($application) {
Write-Host "A recent version of the Liongard Agent was found! Uninstalling..."
$result = $application.Uninstall()
Write-Host "Uninstall result: $($result.ReturnValue)"
if ($result.ReturnValue -eq 0) {
Write-Host "Liongard Agent has been successfully uninstalled."
} else {
Write-Host "Failed to uninstall Liongard Agent. Error code: $($result.ReturnValue)"
}
} elseif ($application2) {
Write-Host "An old version of RoarAgent was found. Uninstalling..."
$result2 = $application2.Uninstall()
Write-Host "Uninstall result: $($result2.ReturnValue)"
if ($result2.ReturnValue -eq 0) {
Write-Host "RoarAgent has been successfully uninstalled."
} else {
Write-Host "Failed to uninstall RoarAgent. Error code: $($result2.ReturnValue)"
}
} else {
Write-Host "No Liongard Agent installation was found."
}

# Wait for 10 seconds to ensure the uninstall processes complete
Start-Sleep -Seconds 10

# Check for any remaining services and remove them
$serviceName = "roaragent.exe" # Corrected service name
$service = Get-Service -Name $serviceName -ErrorAction SilentlyContinue
if ($service) {
Stop-Service -Name $serviceName -Force
Write-Host "Service $serviceName stopped."
sc.exe delete $serviceName
Write-Host "Service $serviceName removed."
} else {
Write-Host "No service named $serviceName found to remove."
}

# Clean up residual files
$agentPath = "C:\Program Files (x86)\LiongardInc" # Updated installation folder path
if (Test-Path $agentPath) {
Remove-Item -Path $agentPath -Recurse -Force
Write-Host "Removed residual Liongard Agent files from $agentPath."
} else {
Write-Host "No residual files found to remove at $agentPath."
}

Step 4: Post-Offboarding Validation

Verify the following:

  • ❌ Environment no longer appears in Liongard

  • ❌ No active agents remain on devices

  • ❌ No integration sync errors

  • ❌ No scheduled tasks or services running


Delete Environment Using the Liongard API πŸ‘¨β€πŸ’»

Use this method only if the UI deletion fails.

Step 1: Create Liongard API Credentials

  1. Click your Name at the Top Right Corner β†’ Account Settings β†’ Access Token

  2. Click Generate New Token β†’ Liongard API Token

  3. Copy:

    • Access Key ID

    • Secret Key

⚠️ The Secret Key is displayed only once so save it securely

Step 2: Generate Base64 Authorization Token

Combine credentials:

ACCESS_KEY:SECRET_KEY

macOS / Linux

echo -n "ACCESS_KEY:SECRET_KEY" | base64

Windows PowerShell

[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("ACCESS_KEY:SECRET_KEY"))

Step 3: Retrieve the Environment ID

  1. Under "Credentials" add the Base 64 key generated above (Step 2)

  2. Under "URL" add you instance ID (us1/us2/us3/eu1/au1/...)

  3. Add "Query Params"
    String : Name
    String : ID
    This will provide you the environment name and their ID(s).

  4. Click on "Try It"


Identify the environmentId for deletion.

cURL Example

curl --request GET \
--url 'https://roar2.app.liongard.com/api/v1/environments?fields[]=Name&fields[]=ID' \
--header 'X-ROAR-API-KEY: MjY5ZDYwNTg0ZWQ0NjQ2M2FhMGU6ZmE2YWQwNzM1OTcwODAzZGI3MDU1YjJiNTI5Nzc1NDBkMTMyZGIwMmUzNmQ3OTM1ODE4N2JlYjBhMDhiMDlmNA==' \
--header 'accept: application/json'
  1. Under "Credentials" add the Base 64 key generated above (Step 2)

  2. Under "URL" add you instance ID (us1/us2/us3/eu1/au1/...)

  3. Add EnvironmentID under "Path Params" captured above (Step 3)

  4. Click on "Try It"

βœ… A 200 response indicates success. Please verify that the environment has been deleted.

cURL Example

curl --request DELETE \
--url https://roar2.app.liongard.com/api/v1/environments/4448 \
--header 'X-ROAR-API-KEY: MjY5ZDYwNTg0ZWQ0NjQ2M2FhMGU6ZmE2YWQwNzM1OTcwODAzZGI3MDU1YjJiNTI5Nzc1NDBkMTMyZGIwMmUzNmQ3OTM1ODE4N2JlYjBhMDhiMDlmNA==' \
--header 'accept: application/json'

When to Contact Liongard Support 🦁

Contact Support if:

  • UI and API deletion both fail

  • Authorization errors occur

  • Agents cannot be removed

  • Environment ID cannot be identified


Disclaimers & Best Practices πŸš€

πŸ” Treat API keys as secrets
πŸ§ͺ Always validate cleanup
πŸ“˜ API deletions are immediate and irreversible

‼️ Deleting an Environment will remove all associated inspectors and agents. All historical data and information will be permanently deleted. This action is irreversible.

Did this answer your question?