Can’t delete Syncthing test folder using TrueNAS Shell

I created a test folder (called “Docs1”) with a few files to sync a folder on my PC to my TrueNAS using SyncThing. Afterward I removed the folder from my PC and from Syncthing on both devices.

I want to delete this folder from my NAS entirely, but it still shows up as a folder in my Syncthing directory. I pathed to the directory in Shell to remove the few files in that folder, that worked, but the folder itself can’t be deleted. The CLI returns an error that the directory is not empty even though I verified that it is.

Is there a way to delete this folder entirely without blowing away the Syncthing app from my NAS?

Well, there are files in there. The first thing to do is:

ls -al

It is likely you have some “hidden” files (they start with a “.”) If all else fails:

rm -rf /mnt/vault/Appdata/SyncThing/Docs1

Use great care with that command, it deletes EVERYTHING in that directory or lower. This basically tells the system “I know what I am doing, delete everything NOW”.

Thank you for the info! I did eventually figured out that the command I needed was indeed rm-rf

All is well!