If I try
sudo find . -name '.DS_Store' -delete
then, within a few seconds, the .DS_Store
files get re-created by Finder before
sudo find . -type d -empty -delete
can take effect.
I can do
sudo find . -name '.DS_Store' -delete; sudo find . -type d -empty -delete
but this only works on small trees. If there are many subfolders, Finder starts recreating before the 2nd command runs.