1

I have to switch machines from time to time. I keep a dotfiles that's pretty elaborate, as part of this routine. I'd also like to make my launchpad folders be portable.

I'm fine with solution that involve the CLI, applescript, or anything that I can do reliably.

A commentor indicated I can run find /private/var/folders -type d -name 'com.apple.dock.launchpad' 2>/dev/null

but it yields multiple results:

/private/var/folders/sy/wnh38ggx3111qkdkjy2gvk940000gn/0/com.apple.dock.launchpad
/private/var/folders/xq/ynvgvft97l9_rx42cvywqx2m0000gp/0/com.apple.dock.launchpad
/private/var/folders/th/gjmmnngn4l13w0_xyxhr4y6c0000gq/0/com.apple.dock.launchpad

A similar question was asked, but that was a while ago. In an apple forum, someone shared the location of the core / default Dock DB, but not the user-specific one.

If anyone knows how these strings are generated, it might be a viable answer.

  • Open Terminal and use the following compound command to copy the Launchpad Database to the current directory, which by default is you $HOME directory: cp -aRv "$(find /private/var/folders -type d -name 'com.apple.dock.launchpad' 2>/dev/null)/db" . – user3439894 Sep 2 at 0:05
  • That is nifty @user3439894 but forme it returns 3 DBs, so it won't make a programmatic solution. – New Alexandria Sep 2 at 0:07
  • It only returned one for me; however, you'll have to check and see which one of those is the actual current Launchpad database. – user3439894 Sep 2 at 0:11
1

In true form, along the way of figuring out how to ask the questions, I seem to have found part of a hint.

There is a folder path /private/var/folders/ that contains a rats-nest of directories with non-human-parseable names. Supposedly one of these contains my Launchpad's database.

If I can learn which, and how to find it programmatically, I will update the answer


The DB groups name + parents can be found in the DB with via

SELECT * 
FROM items i JOIN groups g ON g.item_id = i.rowid 
ORDER BY i.parent_id, i.ordering

The issue remains that apps are listed by a UUID, not name. This suggests that they may not port well to a different computer, since a UUID is typically made in the local context. However, apps registered via the app store or via Apple's dev program may have consistent UUIDs.

  • "Supposedly one of these contains my Launchpad's database." To find which one, make a change in Launchpad and watch what files change. If necessary, repeat the process a couple times to isolate the right location. – Wowfunhappy Sep 2 at 0:03
  • Yes I know that can be done manually, but it won't work for a programmatic solution – New Alexandria Sep 2 at 0:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .