That command (as written) will fail, due to the
. after the f
/bin/rm: illegal option -- .
Also, usually
sudo isn't needed for the user's
~/.Trashinstead, just hold the option key while selecting
Empty Trash in Finder.
Thirdly, it's always better to list the trash contents beforehand, to see what's in there, and find out why they would present a problem at all (if any)... rather than just blindly deleting unknown items.