Remove a server
Remove servers that you no longer want to manage in Alpacon.
This page covers removing individual servers while keeping the workspace. Deleting an entire workspace removes Alpacon from every connected server it can reach, with exceptions for a server that’s offline or on an unsupported host—see What happens to your servers.
Removal process
There are two ways to remove a server:
alpamon unregister(v2.3.0+) removes the agent from the host and makes a best-effort attempt to delete the workspace record, in one step.- Manual: (1) uninstall the Alpamon agent from the server, then (2) delete the server from the Alpacon workspace.
Both are covered below.
1. Uninstall Alpamon agent
First, remove the agent from your server.
The quickest path is alpamon unregister, which stops and removes the service, deletes the local configuration, and makes a best-effort attempt to delete the workspace server record—all in one step. Run it on the server itself (not over Websh), on alpamon v2.3.0 or later:
# Linux / macOS
sudo alpamon unregister --yes
# Windows (elevated PowerShell, on the server)
& "$env:ProgramFiles\alpamon\alpamon.exe" unregister --yesThe command leaves the agent binary and data and log directories in place. Remove those with the steps below if you also need them gone.
To recover a host whose registration is stuck, use alpamon register --force. See Re-registration and recovery.
The per-OS steps below remove the agent and its files manually, and also apply to agents older than v2.3.0.
Debian-based systems (Ubuntu, Debian)
Basic removal:
sudo apt remove alpamon -y && sudo rm -rf /etc/alpamon/alpamon.confComplete removal (including all files):
sudo apt remove alpamon --purge -yComplete removal also deletes:
/etc/alpamon/alpamon.conf/usr/lib/tmpfiles.d/alpamon.conf/lib/systemd/system/alpamon.service/lib/systemd/system/alpamon-restart.service/lib/systemd/system/alpamon-restart.timer/var/log/alpamon/alpamon.log/var/lib/alpamon/alpamon.db
Red Hat-based systems (RHEL, Rocky Linux)
Basic removal:
sudo yum remove alpamonComplete removal (including all files):
sudo yum remove alpamon && \
sudo rm -f /etc/alpamon/alpamon.conf \
&& sudo rm -f /usr/lib/tmpfiles.d/alpamon.conf \
&& sudo rm -f /lib/systemd/system/alpamon.service \
&& sudo rm -f /lib/systemd/system/alpamon-restart.service \
&& sudo rm -f /lib/systemd/system/alpamon-restart.timer \
&& sudo rm -f /var/log/alpamon/alpamon.log \
&& sudo rm -f /var/lib/alpamon/alpamon.dbSUSE-based systems (openSUSE, SLES)
Basic removal:
sudo zypper --non-interactive remove alpamonComplete removal (including configuration, data and logs):
sudo zypper --non-interactive remove alpamon
rpm -q alpamon >/dev/null || sudo rm -rf /etc/alpamon /var/lib/alpamon /var/log/alpamon # only once the package is gonemacOS
Unload the launchd service and remove its plist, then uninstall the Homebrew package to remove the binary. The configuration file is /etc/alpamon/alpamon.conf; remove the configuration, data, and logs if you no longer need them:
sudo launchctl unload /Library/LaunchDaemons/com.alpacax.alpamon.plist
sudo rm -f /Library/LaunchDaemons/com.alpacax.alpamon.plist
brew uninstall alpamon
sudo rm -rf /etc/alpamon /var/lib/alpamon /var/log/alpamonWindows
From an elevated PowerShell. Stop and delete the service before removing the folder, or the removal fails with a sharing violation:
sc.exe stop alpamon
sc.exe delete alpamon
Remove-Item -Recurse -Force "$env:ProgramFiles\alpamon"
Remove-Item -Recurse -Force "$env:ProgramData\alpamon"Verify that the Windows service and files are gone:
sc.exe query alpamon
Test-Path "C:\Program Files\alpamon"
Test-Path "$env:ProgramData\alpamon"sc.exe query reports 1060 when the service is gone, and both paths return False.
See Windows servers for the full removal and recovery details.
2. Delete from workspace
If you removed the agent with the manual per-OS steps above (not alpamon unregister), the workspace still has the server record—delete it here. alpamon unregister attempts to delete the record automatically, but if it can’t reach the workspace (network or token issue) the server may still appear in the list; delete it here in that case.
Requirements:
- Server status must be Disconnected
- Permission: owner or manager of an assigned group, a maintainer of the server, or a user with the Staff or Superuser role
Deletion steps:
- Go to Servers page
- Select server(s) to delete (checkbox)
- Click Delete (bin) icon at top
- Click Unregister in confirmation modal
- Server is removed from list
Bulk deletion
Delete multiple servers simultaneously.
- Select multiple servers
- Click bin icon
- Confirm
- All selected servers deleted
Important notes
What remains and what disappears:
| Data | After the server is removed |
|---|---|
| Server settings | The server leaves the managed list. Its group and access-rule assignments are removed; configure a new registration again. |
| Monitoring history | The removed server has no monitoring page, so its earlier charts are no longer available there. Removal does not itself erase every stored metric immediately. |
| Command execution history | Earlier commands, their details, and output remain available in the Commands audit for authorized viewers within the applicable audit viewing window. |
| Access logs | Earlier Websh and WebFTP activity remains in the audit history within the applicable viewing window. |
| Comments | Server notes are deleted with the server. Save anything you need before removal. |
Re-registration does not restore the removed server: Registering the host again creates a new managed server. Its former settings, monitoring page, and comments do not return. The retained audit records remain separate from the new server registration.
Remove agent first:
- If you only delete from Alpacon without removing agent
- Server will continue attempting connections
- May cause unnecessary resource usage
Re-registration
To re-register a removed server:
- Follow Register a server process again
- New installation script will be generated
- Configure the new server’s settings again. Earlier audit history is not attached to the new registration
Troubleshooting
Server not changing to Disconnected:
- Verify agent is completely removed from server:
systemctl status alpamon- If agent still running, manually stop:
sudo systemctl stop alpamon
sudo systemctl disable alpamonOn Windows, check and stop the service with PowerShell instead:
sc.exe query alpamon
Stop-Service alpamonDelete button disabled:
- Check server status (cannot delete Connected servers)
- Verify you can manage this server (its maintainer, an owner or manager of an assigned group, or Staff/Superuser)