Uninstalling

Instructions for removing Haloy components from your system.

Client Uninstallation

Remove the Haloy CLI (haloy) from your local machine.

Remove Client Only

Shell Script

If you installed via the shell script, you can run the uninstall script:

curl -sL https://sh.haloy.dev/uninstall-haloy.sh | sh

Homebrew

If you installed via Homebrew, you can uninstall the package and untap the repository:

brew uninstall haloy && brew untap haloydev/tap

This removes:

  • The haloy CLI tool from ~/.local/bin/
  • Shell completion scripts (if installed)

This does NOT remove:

  • Client configuration (~/.config/haloy/)
  • Server configurations and tokens

JavaScript Package Managers

If you installed globally:

npm uninstall -g haloy
pnpm remove -g haloy
bun remove -g haloy

If you added it as a dev dependency in your project:

npm uninstall haloy
pnpm remove haloy
bun remove haloy

Remove Client Configuration

Manually remove configuration files associated with the haloy CLI (not needed if you run the uninstall script).

# Remove client configuration rm -rf ~/.config/haloy/ # Remove client data rm -rf ~/.local/share/haloy/

Server Uninstallation

Remove Haloy components from your server.

Remove Admin Tool Only

Remove haloyadm but keep haloyd and deployed applications running:

curl -sL https://sh.haloy.dev/uninstall-haloyadm.sh | sudo sh

This removes:

  • The haloyadm CLI tool from /usr/local/bin/

This does NOT remove:

  • haloyd daemon
  • HAProxy
  • Application containers
  • Configuration or data

Note: You can reinstall haloyadm later if needed to manage the daemon.

Complete Server Removal

Remove all Haloy components, data, and configurations:

curl -sL https://sh.haloy.dev/uninstall-server.sh | sudo sh

This removes:

  • haloyd daemon
  • HAProxy container
  • All Haloy configuration files
  • All Haloy data (databases, certificates, configs)
  • Docker network

This does NOT remove:

  • Your application containers (must be stopped/removed separately)
  • Docker volumes created by your applications
  • haloyadm CLI tool

Stop Applications Before Removal

Before complete server removal, stop your applications:

# From your local machine haloy stop --all --remove-containers # Or on the server docker ps --filter "label=dev.haloy.role=app" -q | xargs docker stop docker ps --filter "label=dev.haloy.role=app" -qa | xargs docker rm

Complete Cleanup

For a full cleanup of everything Haloy-related:

On Local Machine

# 1. Remove CLI curl -sL https://sh.haloy.dev/uninstall-haloy.sh | sh # 2. Remove configuration rm -rf ~/.config/haloy/ rm -rf ~/.local/share/haloy/ # 3. Remove shell completion (if installed) # Bash (Linux) sudo rm -f /etc/bash_completion.d/haloy # Bash (macOS) sudo rm -f /usr/local/etc/bash_completion.d/haloy # Zsh rm -f ~/.local/share/zsh/site-functions/_haloy # Fish rm -f ~/.config/fish/completions/haloy.fish

On Server

# 1. Stop all applications docker ps --filter "label=dev.haloy.role=app" -q | xargs docker stop docker ps --filter "label=dev.haloy.role=app" -qa | xargs docker rm # 2. Remove server components curl -sL https://sh.haloy.dev/uninstall-server.sh | sudo sh # 3. Remove admin tool curl -sL https://sh.haloy.dev/uninstall-haloyadm.sh | sudo sh # 4. Optional: Remove application data volumes docker volume ls --filter "label=dev.haloy.role=app" -q | xargs docker volume rm # 5. Optional: Clean up unused Docker resources docker system prune -a --volumes

Selective Removal

Keep Data, Remove Services

Stop services but preserve data for later reinstallation:

# Stop services sudo haloyadm stop # Remove only the admin tool curl -sL https://sh.haloy.dev/uninstall-haloyadm.sh | sudo sh # Data remains in /var/lib/haloy/ and /etc/haloy/ # Can be restored by reinstalling and running: # sudo haloyadm init

Remove Everything Except Applications

Remove Haloy but keep applications running:

# Applications will continue running but: # - No more deployments possible # - No SSL/TLS (HAProxy removed) # - No domain routing # - Direct access to container ports needed # Stop Haloy services sudo haloyadm stop # Remove Haloy components curl -sL https://sh.haloy.dev/uninstall-server.sh | sudo sh # Applications still running docker ps --filter "label=dev.haloy.role=app"

Warning: Applications will lose HAProxy routing and SSL. You’ll need alternative routing.

What Gets Removed

Client Uninstallation

ItemLocationRemoved
haloy CLI~/.local/bin/haloy✅ Yes
Shell completion/etc/bash_completion.d/ or similar✅ Yes
Client config~/.config/haloy/❌ No (manual)
Client data~/.local/share/haloy/❌ No (manual)

Server Uninstallation (Complete)

ItemLocationRemoved
haloyadm CLI/usr/local/bin/haloyadm❌ No (separate script)
haloyd daemonDocker container✅ Yes
HAProxyDocker container✅ Yes
Configuration/etc/haloy/✅ Yes
Data/var/lib/haloy/✅ Yes
Docker networkhaloy✅ Yes
Application containersUser-deployed❌ No (manual)
Application volumesUser-created❌ No (manual)

Reinstallation

After uninstallation, you can reinstall Haloy:

Reinstall Client

curl -fsSL https://sh.haloy.dev/install-haloy.sh | sh

Reinstall Server

# Install admin tool curl -fsSL https://sh.haloy.dev/install-haloyadm.sh | sudo sh # Initialize sudo haloyadm init # Optionally restore configuration # (if you preserved /etc/haloy/ and /var/lib/haloy/)

Troubleshooting

Docker Containers Won’t Stop

# Force stop docker stop $(docker ps -q --filter "label=dev.haloy.role=app") # Force remove docker rm -f $(docker ps -qa --filter "label=dev.haloy.role=app")

Permission Denied Errors

# Ensure using sudo for server operations sudo su # Then run uninstall script curl -sL https://sh.haloy.dev/uninstall-server.sh | sh

Files Still Remain

# Manually remove remaining files sudo rm -rf /etc/haloy/ sudo rm -rf /var/lib/haloy/ sudo rm -rf /usr/local/bin/haloyadm