Skip to content

Conversation

@moraby256
Copy link

Fix: Robust Cleanup for Orphaned User-Local Desktop Files

Fixes #3574

This PR addresses the issue of application entries remaining in the user's application launcher after a package has been removed using omarchy-pkg-remove.

This bug resulted in "orphaned" desktop files (~/.local/share/applications/*.desktop) pointing to non-existent binaries.

Key Changes in omarchy-pkg-remove

  1. Robust Desktop Entry Deletion:

    • The cleanup logic has been upgraded to a robust find command that iterates over the package selection.
    • It now searches for the .desktop file using multiple common name variations (original casing, lowercase, and variations without hyphens) to ensure the file is caught regardless of how it was created.
  2. Application Menu Cache Refresh:

    • The command omarchy-refresh-applications is now called after the deletion. This is vital, as it forces the desktop environment (like Wofi or Rofi) to rebuild its application cache, immediately eliminating the dead entry.
  3. Correct Flow Control:

    • The success notification (omarchy-show-done) is executed only once, after the package removal, file cleanup, and application refresh are all successfully completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alacritty remains in app menu after removal

1 participant