Delete old smb folder from cli

That was a nice topic with solution that seems could help you: Files amount after moving of data directory is wrong (much bigger) - #3 by gas85.

Just check via command line your shares and find out ID of your old SMB:


Warning


Then simply delete unneeded SMB ID:

And run command sudo -u www-data php occ files:cleanup to do rescan of the files and DB: