How to Uninstall LiteSpeed Web Server

Updated May 6, 2026

This guide covers removing LiteSpeed Web Server (LSWS) from your server. The same procedure applies to all LiteSpeed variants (4 / 8 / 10 worker, DirectAdmin builds) — variant differences are licensing tiers, not separate installs.

Note: Uninstalling the software does not cancel your billing. If you also want to cancel the license, please reply to your support ticket with the server IP — billing is handled separately.

Prerequisites

  • Root SSH access to your server
  • A maintenance window — uninstalling will briefly stop your web server
  • A working backup of
    Terminal
    /etc
    , your sites, and any custom LSWS config
1

Step 1 — Switch back to Apache (cPanel users only)

If LiteSpeed was installed via the cPanel WHM plugin, the cleanest removal is from inside WHM:

WHM → Plugins → LiteSpeed Web Server → "Switch to Apache"

This restores Apache as the active web server. Once back on Apache, run the manual uninstall in Step 3 to remove the LSWS files.

2

Step 2 — Switch back to Apache (DirectAdmin users only)

Terminal
cd /usr/local/directadmin/custombuild
./build set webserver apache
./build apache
./build php n
./build rewrite_confs

This rebuilds DirectAdmin against Apache and turns off LSWS.

3

Step 3 — Run the LiteSpeed vendor uninstall script

This is the official script shipped by LiteSpeed Tech and removes everything under

Terminal
/usr/local/lsws/
:

Terminal
/usr/local/lsws/admin/misc/uninstall.sh

Confirm with y when prompted. The script stops the LSWS service, removes the lsws user, and deletes the install directory.

4

Step 4 — Verify removal

Terminal
# Should print nothing
ls /usr/local/lsws/ 2>/dev/null

# Should NOT show 'lshttpd' or 'litespeed' processes
ps aux | grep -Ei 'lshttpd|litespeed' | grep -v grep

# On cPanel: confirm Apache is serving
systemctl status httpd  # or 'apache2' on Debian/Ubuntu

If all three are clean, LiteSpeed is fully removed.

Troubleshooting

Sites are returning 502 or 404 after uninstall

The web server is not running or PHP-FPM lost its handler. Restart Apache:

Terminal
systemctl restart httpd     # CentOS / AlmaLinux / Rocky / CloudLinux
systemctl restart apache2   # Ubuntu / Debian

Then on cPanel run

Terminal
/scripts/rebuildhttpdconf
and on DirectAdmin run
Terminal
./build rewrite_confs
.

uninstall.sh not found

LSWS was not installed via the vendor installer (rare). Manual cleanup:

Terminal
systemctl stop lsws 2>/dev/null
systemctl disable lsws 2>/dev/null
rm -rf /usr/local/lsws/
userdel -r lsws 2>/dev/null

License file leftovers

After uninstall, the registered license file is gone with

Terminal
/usr/local/lsws/
. If you reinstalled later and saw "license invalid", reach out to support — we'll re-issue the license key for your new install.

Still need help?

Our support team is available to assist with license installation and troubleshooting.

Open Support Ticket

Was this article helpful?

Need help? Chat with us
How to Uninstall LiteSpeed Web Server | Knowledge Base | LicenseW | LicenseW