Uninstalling is never mentioned? #2839
Locked
yigib
started this conversation in
Community Discussions
Replies: 1 comment 6 replies
-
IMPORTANTE NOTEVersion 0.16 has been released. This guide is based on version 0.15; it may work for later versions, but I haven't verified or tested it. You are responsible for your own actions. Yes you right, this should be documented. How to Completely Remove Stalwart from Your ServerPrerequisites
Step 1: Stop the Stalwart ServiceFor systemd-based systems (Ubuntu 18.04+, Debian 10+, CentOS 8+):sudo systemctl stop stalwart.service
sudo systemctl disable stalwart.serviceFor init.d-based systems (Debian 9, CentOS 7 and older):sudo service stalwart stop
sudo update-rc.d stalwart removeFor macOS:sudo launchctl stop system/stalwart.mail
sudo launchctl disable system/stalwart.mail
sudo launchctl unload /Library/LaunchAgents/stalwart.mail.plistStep 2: Remove Service FilesLinux (systemd):sudo rm -f /etc/systemd/system/stalwart.service
sudo systemctl daemon-reloadLinux (init.d):sudo rm -f /etc/init.d/stalwart
sudo rm -f /etc/default/stalwartmacOS:sudo rm -f /Library/LaunchAgents/stalwart.mail.plistStep 3: Remove Installation DirectoryReplace sudo rm -rf /opt/stalwartStep 4: Remove the Stalwart System AccountOn Linux:# Remove the user
sudo userdel -r stalwart
# OR if the account is named _stalwart (macOS style on Linux)
sudo userdel -r _stalwartThe On macOS:# Get the UID of the _stalwart user
dscl /Local/Default -list /Users | grep stalwart
# Delete the user and group
sudo dscl /Local/Default -delete /Users/_stalwart
sudo dscl /Local/Default -delete /Groups/_stalwartStep 5: Clean Up Remaining Files (Optional but Recommended)Check for any remaining Stalwart-related files: # Search for Stalwart configuration or log files
sudo find / -name "*stalwart*" 2>/dev/null
# Remove any found files manually if needed
sudo rm -f /path/to/stalwart/fileStep 6: Verify Complete RemovalRun these commands to confirm Stalwart is completely removed: # Check if service exists
sudo systemctl status stalwart.service 2>&1 | grep "not-found"
# Check if the user account exists
id stalwart 2>&1 | grep "no such user"
# Check if installation directory exists
ls -la /opt/stalwart 2>&1 | grep "cannot access"All three commands should return "not found" or "cannot access" messages. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I've searched the docs, read the FAQ, searched the GitHub repo's issues and discussions. I can't seem to find anything has mentioning how to cleanly uninstall stalwart.
As stalwart doesn't use package managers and is installed from a script, I'm curious about how one should carry out an uninstall with proper cleanup.
Beta Was this translation helpful? Give feedback.
All reactions