LaunchServices problems and Ventura
I’m very grateful for all the comments you made to my recent article on LaunchServices problems in Sonoma 14.0, in particular to Jeff Johnson, who reported that the same errors in lsregister occur in Ventura, but are of no consequence, as the command still removes the app from the Open With menu. Thanks to the time machine of lightweight virtualisation, I can now extend those initial observations to include macOS 13.x Ventura.
Removing unwanted apps
The normal command used in the past to manually remove superfluous entries from the LaunchServices registration database,
lsregister -R -f -u pathname
does return a similar error in Ventura, although there’s no mention of Spotlight in the message. And, in both Ventura and Sonoma, as Jeff reports, the command does what it should regardless of the error message. However, removal is transient, and depends on there being no copy of that app on any local volume. Unless you compress the app or otherwise render it inaccessible, even force restarting the Finder will restore it to the Open With menu.
If you keep a collection of different versions of an app, LaunchServices will discover them all and will add them to the Open With menu, whatever you do, in Ventura and Sonoma. This command is thus functionally of little or no use.
It doesn’t, though, have any effect on Web Apps, which report the same error in Sonoma, but aren’t unregistered in the slightest.
Resetting the database
I have repeated the command to reset the LaunchServices database
lsregister -kill -r -v -apps u
in Ventura, and confirm that it has the same immediate effect of preventing System Settings from opening its window. The only way to restore anything approaching normal function in System Settings is to restart your Mac after resetting the database. Even then, Sonoma may lose some of its icons for individual settings.
LaunchServices scope and VMs
Maybe I haven’t been paying attention, but LaunchServices now searches all mounted local volumes, probably using Spotlight, to discover apps to include in its database. Those keeping collections of old apps on external storage should expect every single one of those to be included in the Open With menu, depending on the types of document they handle. Coupled with the inability to make lasting changes to the apps listed in that menu, this is more than mere inconvenience.
This reaches peak nonsense when running a Ventura or Sonoma VM on Apple silicon. If one of its shared folders is /Applications or any other folder containing apps on the host, all those are added to the Open With menu, as well as those in the VM itself (you may need to open the shared host /Applications folder to trigger this). As many of the apps installed on the host are likely to have come from the App Store, and can’t be run on the VM (as it doesn’t support Apple ID), this only causes frustration.
Demonstration
The Open With menu on a test VM running Ventura on a Sonoma host, without a shared Applications folder.
Following removal of two superfluous apps using lsregister.
After force restarting the Finder, those removed apps are restored.
The same VM, this time with the host’s Applications folder shared with the VM. Most of the apps listed are on the host, and several are from the App Store, and can’t be run on the VM because it lacks support for Apple ID.
Cautions
Ventura’s and Sonoma’s Open With list is now cluttered with apps far outside standard Applications folders. Apple should provide a setting to limit its scope, particularly for VMs.
lsregister is no longer useful for removing apps from the LaunchServices database.
Resetting the LaunchServices database using lsregister -kill will stop System Settings working until that Mac has been restarted, and even then may have lasting adverse effects.
Web Apps can’t be removed from the LaunchServices database using lsregister.