Uninstall the Agent
Remove the DashX agent — and everything it installed (tray, DashX Connect, config) — from a host. Do it remotely from the console when the machine is online, or by hand on the machine when it isn't. Admins only.
1. Uninstall from the console (recommended)
- Go to Fleet and click the device to open Device Details.
- In the info panel on the right, find the Agent card (it shows the installed version).
- Click Uninstall Agent — the red button under Rescan Now / Open Scans.
- Confirm the prompt: "Uninstall the DashX agent from
<host>?" - You get "Agent uninstall sent — the host will go offline shortly". The agent acknowledges the command, waits ~5 seconds, then removes itself and everything below.
The device then shows Offline in Fleet. The device record and its history stay — see step 6 if you also want the record gone.
Requirements
| Requirement | Why |
|---|---|
| Your role is admin | The button is hidden for operators and viewers |
| Device is online | The command travels over the agent's live connection. Offline devices return "the agent must be online to receive the uninstall command" |
| Device is agent‑managed | Ping‑only and SNMP‑only devices have no agent — you get "<name> has no DashX agent to uninstall" |
What gets removed
On every platform the uninstall is a full DashX teardown, not just the agent service:
- the agent service and its binary
- the agent config and data directory
- the DashX tray (Windows only — no‑op on macOS/Linux)
- DashX Connect — the app, its autostart entry and its shortcut
The request is written to Admin → Audit Log as agent_uninstall, with the device name and who asked for it.
If the host uses 802.1X Wi‑Fi or Private Access, sign out of DashX Connect first. Sign‑out removes the device certificate from the machine and releases it on the DashX side; uninstalling without signing out leaves the certificate behind (see the cleanup commands per platform below).
2. Uninstall by hand — Windows
Use this when the host is offline, was re‑imaged off the network, or the console uninstall didn't finish. Run PowerShell as Administrator.
The short way — the agent can uninstall itself:
& "C:\Program Files\DashX\dashx-agent.exe" --uninstall-service --purge
--uninstall-service stops and deletes the service; --purge also wipes config, logs and the Connect install. Leave --purge off if you plan to reinstall the same agent and want the host to keep its device identity (token + device ID).
The full manual sequence (also works when the binary is already gone):
# 1. Agent service (installed via NSSM)
sc.exe stop DashXAgent
sc.exe delete DashXAgent
# 2. Tray task + Connect autostart
schtasks /delete /tn DashXTrayLaunch /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v DashXConnect /f
# 3. Kill anything still running
taskkill /f /im dashx-agent.exe
taskkill /f /im "DashX Connect.exe"
# 4. Files and data
del /f /q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\DashX Connect.lnk"
rmdir /s /q "C:\Program Files\DashX"
rmdir /s /q "%ProgramData%\DashX"
rmdir /s /q "C:\DashX"
Where things live on Windows
| Item | Path / name |
|---|---|
| Service | DashXAgent (NSSM wrapper) |
| Install directory | C:\Program Files\DashX |
| Agent config | C:\Program Files\DashX\dashx-agent.conf |
| Data (chat/IPC) | %ProgramData%\DashX |
| Tray scheduled task | DashXTrayLaunch |
| Connect autostart | HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run → DashXConnect |
| Connect shortcut | %ProgramData%\Microsoft\Windows\Start Menu\Programs\DashX Connect.lnk |
Left‑over certificate (only if Connect was signed in and you skipped sign‑out):
Get-ChildItem Cert:\LocalMachine\My | Where-Object { $_.Issuer -like "*DashX*" } | Remove-Item
3. Uninstall by hand — macOS
The short way:
sudo /usr/local/dashx/dashx-agent --uninstall-service --purge
The full manual sequence:
# 1. Agent LaunchDaemon
sudo launchctl bootout system/com.dashx.agent
sudo rm -f /Library/LaunchDaemons/com.dashx.agent.plist
# 2. Binary, config, logs
sudo rm -rf /usr/local/dashx /etc/dashx /var/lib/dashx
sudo rm -f /var/log/dashx-agent.log /var/log/dashx-agent.err
# 3. DashX Connect
sudo launchctl bootout system /Library/LaunchAgents/com.dashx.connect.plist
sudo pkill -f "DashX Connect.app"
sudo rm -f /Library/LaunchAgents/com.dashx.connect.plist
sudo rm -rf "/Applications/DashX Connect.app"
Left‑over device certificate in the System keychain:
sudo security find-identity -v /Library/Keychains/System.keychain # find the SHA-1
sudo security delete-identity -Z <sha1> /Library/Keychains/System.keychain
Delete identities by SHA‑1 (-Z). security delete-identity -c <name> matches the keychain label, not the certificate CN, so it usually removes nothing.
4. Uninstall by hand — Linux
The short way:
sudo /opt/dashx/dashx-agent --uninstall-service --purge
The full manual sequence:
# 1. systemd unit
sudo systemctl stop dashx-agent
sudo systemctl disable dashx-agent
sudo rm -f /etc/systemd/system/dashx-agent.service
sudo systemctl daemon-reload
# 2. DashX Connect
sudo pkill -x dashx-connect
sudo rm -f /etc/xdg/autostart/dashx-connect.desktop /opt/dashx/dashx-connect
# 3. Binary, config, data
sudo rm -rf /opt/dashx /etc/dashx /var/lib/dashx
If you installed from a .deb / .rpm, apt remove dashx-agent / dnf remove dashx-agent calls the same --uninstall-service path from its post‑removal script.
5. Verify it's gone
| Platform | Command | Expected |
|---|---|---|
| Windows | sc.exe query DashXAgent | The specified service does not exist |
| macOS | sudo launchctl print system/com.dashx.agent | Could not find service |
| Linux | systemctl status dashx-agent | Unit dashx-agent.service could not be found |
| Console | Fleet | Device shows Offline and stops reporting |
6. Remove the device record (optional)
Uninstalling the agent does not delete the device from DashX — history, tickets and audit entries stay attached to it. To remove the record too:
- Go to Fleet.
- Hover the device row and click the trash icon.
- Confirm "Delete this device?".
Uninstall the agent before deleting the record. If you delete the record first, the host keeps running an agent that no longer maps to a device, and you have to clean it up by hand with the commands above.
Reinstalling later
Run the install one‑liner from Admin → Deploy Agent again with a valid install token. If you uninstalled with --purge (or from the console, which always purges), the host enrolls as a new device. If you uninstalled without --purge, the config survives and the host comes back as the same device.