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)
Log in to Liongard
Navigate to Admin β Environments
Locate the environment you want to offboard
Click the red trashcan icon in the Actions column
Review the confirmation prompt
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
Navigate to Admin β Integrations
Open each configured integration
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
Log in to the device
Open Programs & Features
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 ποΈ
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
Click your Name at the Top Right Corner β Account Settings β Access Token
Click Generate New Token β Liongard API Token
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
Under "Credentials" add the Base 64 key generated above (Step 2)
Under "URL" add you instance ID (us1/us2/us3/eu1/au1/...)
Add "Query Params"
String : Name
String : ID
This will provide you the environment name and their ID(s).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'
Step 4: Delete Environment via API
Under "Credentials" add the Base 64 key generated above (Step 2)
Under "URL" add you instance ID (us1/us2/us3/eu1/au1/...)
Add EnvironmentID under "Path Params" captured above (Step 3)
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.




