man page for
Remove the DIRECTORY(ies), if they are empty.
If you want to remove all empty directories then it will be safe. The question you need to ask is:-
Do you want to remove all empty directories?
Some applications need a directory even if it's empty. For example,
journald can be configured so that it only logs to persistent storage if
/var/log/journald exists. If you run your command when that directory is empty then it will be deleted. Afterwards
journald will not log to persistent storage as it can't find the directory. I believe Fedora is configured this way by default.
Also, empty (unmounted) mount points could also be deleted by your command. They should be reasonably easy to fix, but it could still catch you out.