How to Delete Home Directories of Removed Users?
Applicable Products
- All NAS running QTS or QuTS hero
Scenario
After removing the user, the home directory of removed users still exists. Even disabling the home folder for all users function, it doesn't help.
Solution
Please follow steps below.
- Use an SSH client to connect to the NAS using NAS administrator's account: (How do I access my QNAP NAS using SSH)
- Switch to the
homesfolder:cd /share/homes - List existing home directories and confirm the folder name:
ls -la - Force delete the specified user’s home directory:
sudo rm -rf ${UserName}
Warning: The rm -rf command permanently deletes files and folders without recovery. Make sure that ${UserName} exactly matches the orphaned home directory and that you have backed up any important data before running this command.