Where apps hide your files
Everything you set for the Dock, from its size to the apps pinned to it, lives in one small preference file in your Library folder. You can read it, back it up and reset it without reinstalling anything.
~/Library/Preferences/com.apple.dock.plist
That is the Dock's preference file for your user account. On the Mac used for this guide (Apple silicon, macOS Sequoia 15.6) it is about 9 KB, readable only by your account, and it changes whenever you add an app, resize the Dock or change a setting. To see it in Finder, choose Go > Go to Folder (⇧⌘G), paste ~/Library/Preferences and look for the file. From Terminal, this selects it in a Finder window:
open -R ~/Library/Preferences/com.apple.dock.plist
~/Library is hidden by default. In Finder you can also open the Go menu and hold ⌥ to reveal a Library entry.
The file is a property list. These top-level keys were present on the Mac used for this guide (names checked, values not printed):
| Key | What it stores |
|---|---|
persistent-apps | The apps pinned on the left side of the Dock, in order. |
persistent-others | Folders and files pinned on the right side, next to the Trash. |
recent-apps | The suggested and recent apps shown after the pinned apps. |
show-recents | Whether that recent-apps section is shown. |
tilesize | Icon size (the Size slider). |
largesize | Icon size when magnification is on. |
magnification | Whether magnification is on. |
autohide and autohide-delay | Automatic hiding and the delay before the Dock appears. |
wvous-br-modifier | A hot-corner setting for the bottom-right corner. |
mod-count and version | Bookkeeping that the Dock maintains. |
Some keys appear only after you change a setting from its default, so your file may have more or fewer than this list.
Pinned apps are stored with their file location and name, so the file reveals which apps you use. Treat it as personal if you share it.
Use defaults rather than a text editor, because macOS caches preferences in memory and can overwrite a file you edit directly. Reading a single value changes nothing:
defaults read com.apple.dock tilesize
A change takes effect after you restart the Dock, which does not log you out or quit your apps:
defaults write com.apple.dock tilesize -int 48
killall Dock
The Dock relaunches on its own. Most people never need this, because System Settings > Desktop & Dock has controls labelled Size, Magnification, Position on screen, Automatically hide and show the Dock and Show suggested and recent apps in Dock (those exact labels are in the settings pane's own resource file). Use defaults only for things the settings screen does not offer.
First save a copy of your current Dock settings. This reads them and writes a backup file to your Desktop; it changes nothing:
defaults export com.apple.dock ~/Desktop/dock-backup.plist
Then the reset. This deletes all your Dock customisation, including every pinned app and folder. Run it only once the backup file exists:
defaults delete com.apple.dock
killall Dock
The Dock comes back with Apple's default layout for your macOS version. To put your old layout back, import the backup and restart the Dock:
defaults import com.apple.dock ~/Desktop/dock-backup.plist
killall Dock
defaults export and defaults import go through the same preferences system the Dock uses, which is why they are safer than copying the .plist file into place with Finder or cp: a copied file can be overwritten by the cached settings still in memory.
If the Dock only misbehaves visually, for example it is stuck or shows a blank icon, run killall Dock on its own first. It reloads the settings without changing them.
A few siblings turn up next to the main file:
com.apple.dock.extra.plist in ~/Library/Preferences: a tiny file (42 bytes on the Mac used for this guide). Apple does not document it, so leave it alone.~/Library/Preferences/ByHost/com.apple.dock.<identifier>.plist and com.apple.dock.extra.<identifier>.plist: per-machine files, one set per hardware identifier. The Mac used for this guide had two sets. Apple does not document their contents, and your pinned apps are in the main file.Launchpad's layout is not in the Dock's preference file. On the Sequoia Mac used for this guide there is no Dock folder in ~/Library/Application Support, which older guides point to; Launchpad's database sits in the per-user temporary area instead, at $(getconf DARWIN_USER_DIR)com.apple.dock.launchpad/db/. Check what your own Mac has before following a guide that deletes anything.
Migration Assistant brings the Dock settings across with your account, and a Time Machine restore includes ~/Library/Preferences. To carry only the Dock, export it on the old Mac with the defaults export command above, then import it on the new one and restart the Dock. Pinned apps that are not installed on the new Mac show a question mark until you remove them.
Spotlight and Finder searches leave out ~/Library, including the Preferences folder, and the file is named after the Dock's bundle identifier rather than anything you would guess.
Typing com.apple.dock in Everywhere lists the main file, the ByHost copies, the extra files and the Launchpad folder together, along with any backup you exported, so you can see exactly what exists before changing anything. Preferences is one of the ~/Library folders it covers without extra permissions. It matches file names only, not the keys inside a plist.
At ~/Library/Preferences/com.apple.dock.plist. It stores your pinned apps and folders, the Dock size, hiding, magnification and the recent-apps setting.
Back up first with defaults export com.apple.dock ~/Desktop/dock-backup.plist, then run defaults delete com.apple.dock followed by killall Dock. The reset removes your pinned apps; defaults import with the backup file puts them back.
Use defaults write instead, because macOS caches preferences and may overwrite a file you edit by hand. Run killall Dock afterwards to apply the change.
In System Settings > Desktop & Dock, switch off Show suggested and recent apps in Dock. The choice is stored in the show-recents key of the Dock's preference file.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised