PortGate

Resources · Product docs · Product doc

Uninstall the agent

One command removes the schedules, services, files and logs. Files you quarantined are kept.

Remove everything

On the server, run:

curl -fsSL https://portgate.dev/downloads/uninstall.sh | sudo sh

This removes:

  • the heartbeat and malware cron entries;
  • the portgate-ai-proxy and portgate-malware services;
  • /opt/portgate;
  • the PortGate log files.

Files the malware scan moved to quarantine are kept in /opt/portgate-quarantine-kept, so nothing you set aside is deleted by surprise. Delete that folder yourself once you are sure you do not need it.

A user-level AI proxy

If you installed the AI proxy without root, remove it as the same user:

curl -fsSL https://portgate.dev/downloads/uninstall.sh | sh -s -- --user

Then point your OpenAI or Anthropic base URL back at the provider, since the proxy at 127.0.0.1:8787 is gone.

Remove the server from the dashboard

Open the server in the dashboard and choose Remove server. That deletes its history and revokes its token, so a forgotten copy of the agent cannot post again. Removing it in the dashboard does not touch the host, so run the uninstall command as well.

Read the script first

curl -fsSLO https://portgate.dev/downloads/uninstall.sh
less uninstall.sh
sudo sh uninstall.sh