Uninstalling FlightStack Agent | FlightStack
Uninstalling FlightStack
Section titled “Uninstalling FlightStack”This guide covers how to completely remove the FlightStack agent and CLI from your system.
Quick Uninstall
Section titled “Quick Uninstall”For a complete removal, run these commands in order:
# 1. Stop and remove the startup serviceflightstack agent uninstall
# 2. Unregister the agent from FlightStackflightstack agent unregister
# 3. Remove binariessudo rm /usr/local/bin/flightstack-agentsudo rm /usr/local/bin/flightstack
# 4. Remove configuration and logsrm -rf ~/.flightstack# 1. Stop and remove the startup serviceflightstack agent uninstall
# 2. Unregister the agent from FlightStackflightstack agent unregister
# 3. Remove binariessudo rm /usr/local/bin/flightstack-agentsudo rm /usr/local/bin/flightstack
# 4. Remove configuration and logsrm -rf ~/.flightstack# 1. Stop and remove the startup serviceflightstack agent uninstall
# 2. Unregister the agent from FlightStackflightstack agent unregister
# 3. Remove binaries (adjust path if installed elsewhere)Remove-Item "C:\Program Files\FlightStack\flightstack-agent.exe" -ForceRemove-Item "C:\Program Files\FlightStack\flightstack.exe" -Force
# 4. Remove configuration and logsRemove-Item "$env:USERPROFILE\.flightstack" -Recurse -ForceStep-by-Step Uninstallation
Section titled “Step-by-Step Uninstallation”-
Stop the Running Agent
Section titled “Stop the Running Agent”If the agent is currently running:
Terminal window flightstack agent stop -
Remove Startup Service
Section titled “Remove Startup Service”Remove the auto-start configuration:
Terminal window flightstack agent uninstallThis removes:
- macOS:
~/Library/LaunchAgents/com.flightstack.agent.plist - Linux:
~/.config/systemd/user/flightstack-agent.service - Windows:
FlightStackAgentscheduled task
- macOS:
-
Unregister the Agent
Section titled “Unregister the Agent”Remove the agent registration from FlightStack servers:
Terminal window flightstack agent unregister -
Remove Binaries
Section titled “Remove Binaries”Delete the executable files:
Terminal window # Find where binaries are installedwhich flightstack-agentwhich flightstack# Remove them (common locations)sudo rm /usr/local/bin/flightstack-agentsudo rm /usr/local/bin/flightstack# If installed via Homebrewbrew uninstall flightstackTerminal window # Find installation locationGet-Command flightstack-agent | Select-Object SourceGet-Command flightstack | Select-Object Source# Remove binariesRemove-Item "<path-to-binary>" -Force -
Remove Configuration Directory
Section titled “Remove Configuration Directory”Delete all FlightStack configuration, credentials, and logs:
Terminal window rm -rf ~/.flightstackTerminal window Remove-Item "$env:USERPROFILE\.flightstack" -Recurse -Force
What Gets Removed
Section titled “What Gets Removed”Configuration Directory (~/.flightstack/)
Section titled “Configuration Directory (~/.flightstack/)”| File | Description |
|---|---|
config.json | Agent registration and token |
config.<profile>.json | Profile-specific agent configs |
cli_config.json | CLI authentication token |
agent.log | Agent output logs |
agent.error.log | Agent error logs |
Service Files
Section titled “Service Files”| Platform | Location |
|---|---|
| macOS | ~/Library/LaunchAgents/com.flightstack.agent.plist |
| Linux | ~/.config/systemd/user/flightstack-agent.service |
| Windows | Scheduled Task: FlightStackAgent |
Binaries
Section titled “Binaries”| Binary | Common Locations |
|---|---|
flightstack-agent | /usr/local/bin/, ~/.local/bin/, or custom path |
flightstack | /usr/local/bin/, ~/.local/bin/, or custom path |
Manual Cleanup
Section titled “Manual Cleanup”If the standard uninstall doesn’t work, you can manually remove everything:
# Stop launchd service if runninglaunchctl stop com.flightstack.agent 2>/dev/nulllaunchctl unload ~/Library/LaunchAgents/com.flightstack.agent.plist 2>/dev/null
# Remove service filerm -f ~/Library/LaunchAgents/com.flightstack.agent.plist
# Remove binariessudo rm -f /usr/local/bin/flightstack-agentsudo rm -f /usr/local/bin/flightstack
# Remove all config and logsrm -rf ~/.flightstack
# Remove any cached credentials (if using Keychain)security delete-generic-password -s "flightstack" 2>/dev/null# Stop and disable systemd servicesystemctl --user stop flightstack-agent 2>/dev/nullsystemctl --user disable flightstack-agent 2>/dev/null
# Remove service filerm -f ~/.config/systemd/user/flightstack-agent.servicesystemctl --user daemon-reload
# Remove binariessudo rm -f /usr/local/bin/flightstack-agentsudo rm -f /usr/local/bin/flightstack
# Remove all config and logsrm -rf ~/.flightstack# Stop and remove scheduled taskschtasks /end /tn FlightStackAgent 2>$nullschtasks /delete /tn FlightStackAgent /f 2>$null
# Remove binariesRemove-Item "C:\Program Files\FlightStack" -Recurse -Force -ErrorAction SilentlyContinue
# Remove from PATH if added# (Manual step - edit Environment Variables)
# Remove all config and logsRemove-Item "$env:USERPROFILE\.flightstack" -Recurse -Force -ErrorAction SilentlyContinueVerify Complete Removal
Section titled “Verify Complete Removal”After uninstalling, verify everything is removed:
# Check binaries are gonewhich flightstack-agent # Should return nothingwhich flightstack # Should return nothing
# Check config is gonels ~/.flightstack # Should say "No such file or directory"
# Check service is gone (macOS)launchctl list | grep flightstack # Should return nothing
# Check service is gone (Linux)systemctl --user status flightstack-agent # Should say "not found"# Check binaries are goneGet-Command flightstack-agent -ErrorAction SilentlyContinueGet-Command flightstack -ErrorAction SilentlyContinue
# Check config is goneTest-Path "$env:USERPROFILE\.flightstack" # Should return False
# Check scheduled task is goneschtasks /query /tn FlightStackAgent # Should say "not found"Reinstalling
Section titled “Reinstalling”If you want to reinstall FlightStack later:
- Download the latest version from Installation Guide
- Run
flightstack loginto authenticate - Run
flightstack agent registerto register your machine - Run
flightstack agent startto start the agent
Troubleshooting
Section titled “Troubleshooting””Command not found” during uninstall
Section titled “”Command not found” during uninstall”If you’ve already removed the binaries, use manual cleanup steps above.
Agent still shows in FlightStack app
Section titled “Agent still shows in FlightStack app”Delete it manually:
- Go to FlightStack web app
- Navigate to Build Agents
- Click on the agent
- Click Delete Agent
Service still running after uninstall
Section titled “Service still running after uninstall”# Force stop and unloadlaunchctl stop com.flightstack.agentlaunchctl unload ~/Library/LaunchAgents/com.flightstack.agent.plistlaunchctl remove com.flightstack.agent# Force stopsystemctl --user stop flightstack-agentsystemctl --user disable flightstack-agentsystemctl --user daemon-reload# Force end taskStop-Process -Name "flightstack-agent" -Force -ErrorAction SilentlyContinueschtasks /delete /tn FlightStackAgent /fPermission denied errors
Section titled “Permission denied errors”Run removal commands with elevated privileges:
sudo rm /usr/local/bin/flightstack-agentsudo rm /usr/local/bin/flightstackRun PowerShell as Administrator, then execute the removal commands.