Documentation menu
Administration

Uninstalling

The removal script works in three scopes: the panel only, the panel and sites, or the whole stack. Know what will be deleted before you choose.

Three removal scopes

The removal script decides what to delete from the flags you give it. The scope you choose affects whether you can go back, so decide first which one fits:

  • No flag (panel only). Deckpa itself is deleted: the system services, program files, configuration, panel database, and logs. The web server, MariaDB, site files (/home/<domain>), and databases stay where they are.
  • --purge-sites. In addition to the above, all site users, their cron and FTP accounts, the files under /home/<domain>, and the backups and logs under /home/.deckpa-data are deleted. The web server and MariaDB packages stay installed.
  • --all. In addition to --purge-sites, the whole stack is removed: OpenLiteSpeed and lsphp, MariaDB (with all of its databases), Valkey, Memcached, Pure-FTPd, PowerDNS, and phpMyAdmin. The server returns to a state close to what it was before Deckpa.
The script warns that the action cannot be undone. --purge-sites deletes site files, and --all also deletes all databases. Take a backup first and make sure the backups are stored outside the server (for example, on Google Drive); both scopes delete the backup archives on the server.

Before you remove

  • Take a current backup of every site and confirm it was sent to a cloud destination. --purge-sites and --all also delete the backup archives on the server (/home/.deckpa-data).
  • If you are moving to another server, first install Deckpa on the new server and restore the backups there (see Installation).
  • If you remove only the panel, the site files stay, but there is no interface left to manage them. Certificate renewal and scheduled backups are the panel's job, so they stop when the panel is removed.
  • Panel user accounts, permission groups, and panel settings live in the panel database (/var/lib/deckpa) and are deleted in every scope.

The command

The script must run as root. Connect to the server over SSH and type the scope you want:

bash
# panel only
bash <(curl -fsSL https://get.deckpa.dev/uninstall)

# the panel and all sites
bash <(curl -fsSL https://get.deckpa.dev/uninstall) --purge-sites

# the panel, the sites, and the whole stack
bash <(curl -fsSL https://get.deckpa.dev/uninstall) --all

If you are connected as a user who is not root, download the script first and then run it with sudo. The sudo bash <(curl …) form does not work:

bash
curl -fsSL https://get.deckpa.dev/uninstall -o /tmp/deckpa-uninstall.sh
sudo bash /tmp/deckpa-uninstall.sh --all

Before it starts, the script prints what will be deleted and asks you to type YES; any other answer cancels. To skip the question, add --yes (short form -y). When the script's standard input is a pipe it cannot read the answer and cancels, so if you run it through a pipe you must pass --yes. If you type an unrecognized flag, the script exits without deleting anything.

The process runs step by step (stopping the services, deleting files, removing the panel user, and, depending on the scope, the sites and the stack). If a step fails, the script does not stop and continues with the next ones; package removal is tried twice, and if it still fails the script reports which packages may remain.

What is deleted in each scope

Even with no flag, these are removed:

  • The deckpa-api and deckpa-executor services, the connection rate limit and outbound block services, and their nftables tables.
  • The deckpa command and the two program files under /usr/local/bin; /etc/deckpa, /var/lib/deckpa (the panel database and the audit record), and /var/log/deckpa.
  • The firewall rule and SELinux port label for the panel port, and Deckpa's fail2ban rules.
  • The panel system user and the deckpa_adm MariaDB account created for the phpMyAdmin one-click sign-in.
  • The /root/deckpa-credentials.txt file and the sites' temporary file directories (/home/.deckpa-tmp).

--purge-sites also deletes each site's Linux user, cron entries, FTP accounts, home directory, and OpenLiteSpeed virtual host configuration. --all removes the OpenLiteSpeed, lsphp, MariaDB (including /var/lib/mysql), Valkey, Memcached, Pure-FTPd, and PowerDNS packages, and also reverts the hidepid mount option the installation added for /proc and the disk quota option it added for /home.

After removal

  • The script does not touch the SSH port. If the port was changed earlier, it stays as changed, so you do not lock yourself out.
  • An --all removal leaves the package repositories the installation added (for example EPEL and LiteSpeed) in place, because other software may use them.
  • Delete the files you downloaded yourself (for example /tmp/deckpa-uninstall.sh).
  • If you plan to reinstall on the same server, use --all. The installer refuses to run if the server already has a MariaDB installation or a non-empty /var/lib/mysql, or if Deckpa's files are still present. On a clean server the one-line install command works again (see Installation).