Bug 511469 - Application menu occasionally fails to update after installing or removing applications until KSycoca cache rebuild
Summary: Application menu occasionally fails to update after installing or removing ap...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (other bugs)
Version First Reported In: 6.5.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-01 15:49 UTC by Luka Rasputin
Modified: 2025-12-12 23:12 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of Bottles missing an icon (57.79 KB, image/png)
2025-11-14 13:30 UTC, Luka Rasputin
Details
Script to reproduce the issue (412 bytes, text/x-python)
2025-12-11 19:07 UTC, Luka Rasputin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luka Rasputin 2025-11-01 15:49:33 UTC
SUMMARY
Sometimes after installing or uninstalling applications, the Plasma application menu does not refresh automatically.
Newly installed applications may be missing from their categories (though they are searchable), and removed applications may remain listed.
Running kbuildsycoca6 --noincremental or re-logging in always fixes the issue.

STEPS TO REPRODUCE
1. Install an application (either a native package or a Flatpak), for example:
sudo pacman -S obs-studio
or
flatpak install flathub com.obsproject.Studio

2. Open the Application Menu and browse to its category (e.g. Multimedia).
Sometimes the new app appears immediately, but other times it does not.

3. If missing, run:
kbuildsycoca6 --noincremental
The app appears after the cache rebuild.

4. Occasionally, uninstalled applications also remain visible until the cache rebuild.

OBSERVED RESULT
The application menu sometimes fails to refresh, showing outdated entries until KSycoca is manually rebuilt or the session is restarted.

EXPECTED RESULT
The application menu should always update automatically after installing or removing applications.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Comment 1 TraceyC 2025-11-04 19:56:00 UTC
Thanks for the bug report.

I'm not able to reproduce this on Plasma built from git-master. After installing the OBS flatpak, it was immediately available in Application Menu -> Multimedia. After removing, it is removed from the menu. I had uninstalled and reinstalled it 5 times.

I'm also unable to reproduce on Fedora 42 with Plasma 6.5.1

Given that this is intermittent, I'll leave this open so others can try to reproduce
Comment 2 Luka Rasputin 2025-11-14 13:29:58 UTC
I've also noticed that sometimes newly installed applications are missing an icon. Restarting Plasma also fixed this. Not sure if it's the same bug or not.
Comment 3 Luka Rasputin 2025-11-14 13:30:56 UTC
Created attachment 186781 [details]
Screenshot of Bottles missing an icon
Comment 4 Nate Graham 2025-12-08 17:16:12 UTC
Yeah, this one is going to be some super weird issue. We'll need steps to reproduce so we can investigate and fix it. Can you do some troubleshooting?

For example, does it happen in a new clean user account on the same computer?
Comment 5 Luka Rasputin 2025-12-11 16:14:08 UTC
Yes, it does happen in a fresh user account. I tried reproducing the bug by installing different applications, but it doesn't seem to depend on the specific apps. The same applications may or may not appear in the menu, it seems random. When they don't appear, reinstalling them, restarting Plasma, or manually running kbuildsycoca6 makes them show up in the menu.
Comment 6 Luka Rasputin 2025-12-11 19:07:59 UTC
Created attachment 187532 [details]
Script to reproduce the issue

I created a script to reproduce the issue more easily.

Steps to reproduce the issue:
1. Install any valid desktop entry to `$HOME/.local/share/applications`
2. Ensure the file does not have duplicates in `/usr/share/applications`
3. Modify the `DESKTOP_ENTRY` variable in the script to point to your file
4. Run the script
5. While the script is running, try to locate the app in its category in the application menu (but don't search for the app by name)
6. After checking, close the application menu (it doesn't refresh while open)

As the script renames the .desktop file, the entry should disappear from the menu when the file's suffix is changed to .bak and reappear when it changes back to .desktop. However, sometimes the menu does not update as expected, and the app remains listed when it should disappear, or vice versa.