

To me it looked like this command just copies provided .desktop file to ~/.local/share/applications/ directory. Also, there’s xdg-desktop-menu uninstall whatever.dekstop which is effectively the same as removing .desktop file from this directory. Probably just copying and removing files is more natural.
You’re welcome. I myself not once and not twice stumbled upon long wanted solution in obscure corners of internet.