Skip to content

lsregister MacOS Command Guide

The MacOS lsregister command allows users to manage the Launch Services database, which stores information about applications and file types. By using this command, you can reset the database, view its contents, and troubleshoot issues related to file associations. This powerful tool is especially useful for resolving problems with file types not opening in the expected application or applications not appearing as options when opening a specific file. With the lsregister command, you can ensure that your MacOS system functions smoothly and efficiently by maintaining and updating the Launch Services database accurately.

lsregister Syntax:

Terminal window
lsregister [options] [parameters]

Options:

OptionDescription
-killReset the Launch Services database.
-lintCheck files for registration issues.
-dumpPrint registrations in a human-readable format.
-seedSeed the database with the defaults.
-appsDisplay registered applications.

Parameters:

ParameterDescription
pathPath to the file or directory to register.
bundleidBundle ID of the application to register.
pathpath

lsregister Command Samples:

Register an Application

Terminal window
lsregister -register /Applications/MyApp.app

Registers the specified application with the Launch Services database.

List all registered applications

Terminal window
lsregister -dump

Displays a list of all applications registered in the Launch Services database.

Verify the registration of an application

Terminal window
lsregister -lint -f /Applications/MyApp.app

Checks and verifies the registration of the specified application in the Launch Services database.

Show the default application for a specific file type

Terminal window
lsregister -dump | grep .txt

Finds and displays the default application associated with the “.txt” file type.

Unregister an application

Terminal window
lsregister -u /Applications/MyApp.app

Unregisters the specified application from the Launch Services database.

Rebuild the Launch Services database

Terminal window
lsregister -kill -seed

Rebuilds the Launch Services database, resolving issues related to application registrations.

Open the registered app’s URL on the App Store

Terminal window
lsregister -url telnet

Opens the URL of the registered application on the App Store, using the specified identifier.

How do I use lsregister in MacOS?

To use the lsregister command in MacOS, execute the following command:

Terminal window
lsregister -lint

How can I rebuild the Launch Services database using lsregister in MacOS?

To rebuild the Launch Services database using lsregister in MacOS, run the following command:

Terminal window
lsregister -kill -seed -r

How do I list all the applications registered with lsregister in MacOS?

To list all applications registered with lsregister in MacOS, use the following command:

Terminal window
lsregister -dump

How can I register a specific application with lsregister in MacOS?

To register a specific application with lsregister in MacOS, use the following command:

Terminal window
lsregister -f /Path/To/Application.app

How do I unregister a specific application with lsregister in MacOS?

To unregister a specific application with lsregister in MacOS, execute the following command:

Terminal window
lsregister -u /Path/To/Application.app

How can I force lsregister to update all applications in MacOS?

To force lsregister to update all applications in MacOS, run the following command:

Terminal window
lsregister -f -R

Applications of the lsregister command

  • Updating the Launch Services database
  • Managing file associations and default applications
  • Troubleshooting issues with file open actions and associations
  • Resetting the Launch Services database at system or user level
  • Viewing information about registered applications and file types
  • Triggering a re-registration of applications and file types
  • Rebuilding the Launch Services database
  • Clearing the Launch Services cache