This guide covers how to clean up cached data, remove licenses, maintain your Docker environment, and completely uninstall WP Staging CLI.
Cleanup Commands
WP Staging CLI provides several cleanup commands to manage cached data and stored credentials.
Clean Cache Files
Remove cached API responses and temporary data:
wpstaging clean cacheCache files include:
- License validation responses
- API response cache
- Temporary download files
Cache is automatically cleaned during normal operation (entries older than 4 hours are removed on startup).
Remove Stored License
Remove the locally stored license key without deactivating it on the server:
wpstaging clean licenseUse this when you want to:
- Switch to a different license key
- Re-enter your license key
- Clear credentials without server communication
Note: This only removes the local license file. The license remains active on your WP Staging account. Use wpstaging deactivate to fully deactivate the license.
Clean Everything
Remove all cached data and stored credentials:
wpstaging clean allThis removes:
- All cache files
- Stored license key
- Other temporary data in the working directory
Deactivate License
To fully deactivate your license on the WP Staging servers and remove local storage:
wpstaging deactivateThis command:
- Contacts WP Staging servers to deactivate the license
- Frees up a license slot on your account
- Removes the local license file
Alias: You can also use wpstaging unregister.
Remove Docker Environment
If you’ve used the Docker features, remove all containers, volumes, and configurations:
wpstaging removeWarning: This permanently removes all WordPress sites, databases, and Docker configurations. This action cannot be undone. You’ll be prompted for confirmation.
This command:
- Stops all running containers
- Removes all Docker volumes (including database data)
- Removes all site configurations
- Removes the entire
~/wpstagingdirectory (or custom--env-path)
Important: Run this before uninstalling WP Staging CLI if you’ve used the Docker features.
Uninstall WP Staging CLI
To completely remove WP Staging CLI from your system:
Step 1: Remove Docker Data (if used)
If you’ve used Docker features, first clean up:
wpstaging removeStep 2: Run Uninstaller
Linux, macOS, WSL:
curl -fsSL https://wp-staging.com/uninstall.sh | bashWindows PowerShell:
irm https://wp-staging.com/uninstall.ps1 | iexWindows CMD:
curl -fsSL https://wp-staging.com/uninstall.cmd -o uninstall.cmd && uninstall.cmd && del uninstall.cmdThe uninstaller removes:
- The wpstaging binary and aliases
- PATH entries
- Bash completion scripts (Linux/macOS)
- License key environment variable
- Cache directories (
~/.wpstaging)
Manual Uninstallation
If you prefer to uninstall manually:
Linux, macOS:
# Remove the binary
rm ~/.local/bin/wpstaging
# Or if installed system-wide:
sudo rm /usr/local/bin/wpstaging
# Remove bash completion (if installed)
rm ~/.local/share/bash-completion/completions/wpstaging
# Remove license and cache data
rm -rf ~/.wpstaging
# Remove Docker environment (if used)
rm -rf ~/wpstagingWindows PowerShell:
# Remove the binary
Remove-Item "$env:LOCALAPPDATA\Programs\wpstaging" -Recurse -Force
# Remove from PATH (manual step required)
# Go to System Properties > Environment Variables > User Variables > PATH
# Remove the wpstaging entry
# Remove license and cache data
Remove-Item "$env:USERPROFILE\.wpstaging" -Recurse -Force
# Remove Docker environment (if used)
Remove-Item "$env:USERPROFILE\wpstaging" -Recurse -ForceWhen to Use Each Option
| Scenario | Command |
|---|---|
| Clear temporary files and cache | wpstaging clean cache |
| Switch to a different license | wpstaging clean license then wpstaging register |
| Stop using this license on this machine | wpstaging deactivate |
| Remove all Docker sites and data | wpstaging remove |
| Complete uninstallation | wpstaging remove (if Docker used), then uninstall script |
| Reset everything but keep CLI installed | wpstaging clean all + wpstaging remove |
Cleanup Command Summary
| Command | What It Removes |
|---|---|
clean cache | Cache files only |
clean license | Local license file only (keeps active on server) |
clean all | Cache + local license + other temporary data |
deactivate | Deactivates on server + removes local license |
remove | All Docker containers, volumes, sites, configs |
Related Documentation
- Installation Guide – Reinstall WP Staging CLI
- License Registration – Register a new license
- Configuration and Environment – Configure the CLI