Kbuildsycoca6: "applications.menu" not found in ("/home/USER/.config/menus", "/etc/xdg/menus")

after upgrading to plasma I am facing several issues, crashes and weird behaviors. I took on the support advice of clearing the .cache directory and running the kbuildsycoca6 --noincremental command

but the command fails complaining about not finding applications.menu

it seems applications.menu has been renamed to plasma-applications.menu in plasma 6 but kbuildsycoca6 is not aware of the change and is still looking for the previous name.

Your system should have an environment variable called XDG_MENU_PREFIX that is set to “plasma-” when running in Plasma.

This is supposed to be setup by the plasma_session binary (or one of the startplasma commands) so running under Plasma you should be fine. If you want to manually run kbuildsycoca6 outside of Plasma, you should specify this explicitly, for example:

XDG_MENU_PREFIX=plasma- kbuildsycoca6

This is how modern DEs are expected to work - see the spec here - and GNOME also does the same thing with current releases.