How to Uninstall LiteSpeed Web Server
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 , your sites, and any custom LSWS configTerminal
/etc
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.
Step 2 — Switch back to Apache (DirectAdmin users only)
cd /usr/local/directadmin/custombuild
./build set webserver apache
./build apache
./build php n
./build rewrite_confsThis rebuilds DirectAdmin against Apache and turns off LSWS.
Step 3 — Run the LiteSpeed vendor uninstall script
This is the official script shipped by LiteSpeed Tech and removes everything under
/usr/local/lsws//usr/local/lsws/admin/misc/uninstall.shConfirm with y when prompted. The script stops the LSWS service, removes the lsws user, and deletes the install directory.
Step 4 — Verify removal
# 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/UbuntuIf 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:
systemctl restart httpd # CentOS / AlmaLinux / Rocky / CloudLinux
systemctl restart apache2 # Ubuntu / DebianThen on cPanel run
/scripts/rebuildhttpdconf./build rewrite_confsuninstall.sh not found
LSWS was not installed via the vendor installer (rare). Manual cleanup:
systemctl stop lsws 2>/dev/null
systemctl disable lsws 2>/dev/null
rm -rf /usr/local/lsws/
userdel -r lsws 2>/dev/nullLicense file leftovers
After uninstall, the registered license file is gone with
/usr/local/lsws/