Before you migrate to a new Mac: what to clear first, and what to keep
Migration Assistant moves your old Mac onto a new one: your apps, each user account with everything in it, other files and your settings. It copies what you choose as it is, so years of build files, caches, old installers and backups of phones you no longer have can go across too. Clearing what rebuilds by itself first makes the copy smaller and quicker, and the new Mac starts out lighter.
- Clear first, it rebuilds by itself: app caches, Xcode DerivedData, old simulators and device support files, package manager caches,
node_modulesin old projects, and Docker’s build cache. - Finished with: the Trash, used installers in Downloads, old “Install macOS” apps, and backups of iPhones and iPads you no longer have or that are safe elsewhere.
- Keep: your files and Photos library, Mail and Messages, the newest backup of each device you use, Xcode Archives, Docker volumes, and your keys and settings.
1. What Migration Assistant copies
On the new Mac you tick what to bring, and each choice opens up so you can pick parts of it. According to Apple’s Mac User Guide, the choices are:
- Applications: your apps. Ones that aren’t compatible, or that the new Mac already has in a newer version, may not come across.
- User accounts: each account’s home folder, with its documents, pictures, desktop, Downloads folder and more, including the hidden Library where apps keep their data.
- Other Files & Folders: documents and files outside the user accounts.
- System & Network: settings such as the desktop picture and network settings.
So everything in your account goes across, hidden folders included. Migration Assistant doesn’t delete anything from the old Mac, and Apple warns that a large transfer can take hours. Time Machine’s local snapshots stay behind: they belong to the old Mac’s disk.
2. What rebuilds by itself, so it can go first
All of this comes back on its own on the new Mac, made fresh for it, so there’s no reason to carry the old copies across. Quit the apps concerned first.
| Folder | What it is | Before you migrate |
|---|---|---|
~/Library/Caches | Files apps keep so they load faster. | Safe Clear what’s inside each app’s folder. The apps rebuild them. |
~/Library/Developer/Xcode/DerivedData | Xcode’s build output and indexes. | Rebuilds With Xcode quit. Xcode builds it again on the new Mac. |
~/Library/Developer/Xcode/iOS DeviceSupport | Debug symbols for each iOS version you’ve connected. | Rebuilds Xcode copies them again when you plug a device in. |
~/Library/Developer/CoreSimulator/Devices | Simulators, with their apps and data. | You decide Remove ones you don’t use with xcrun simctl, below. Xcode can add them back. |
~/.npm, ~/Library/Caches/Homebrew, ~/Library/Caches/pip, ~/.gradle/caches | Package managers’ downloads. | Rebuilds They download again when a project needs them. |
node_modules in old projects | One project’s installed packages. | Rebuilds npm install brings them back. |
| Docker’s build cache and unused images | Inside Docker Desktop’s disk image. | Rebuilds docker system prune asks first and keeps volumes. Images download again on the next pull. |
The commands, for the tools you have (skip the lines for ones you don’t):
xcrun simctl delete unavailable
npm cache clean --force
brew cleanup
docker system prune
More on each, including simulator runtimes and Python: Xcode DerivedData, node_modules and Docker: what’s safe to delete, and what happens after you delete DerivedData.
Moving from an Intel Mac to Apple silicon? Homebrew lives in /usr/local on Intel and in /opt/homebrew on Apple silicon. Rather than bring the old one across, save a list of what you installed on the old Mac:
brew bundle dump --file=~/Brewfile
Then install Homebrew on the new Mac and run brew bundle --file=~/Brewfile there.
3. What you’ve finished with
- The Trash. Empty it: everything in it is something you’ve already decided to throw away.
- Used installers in Downloads:
.dmg,.pkgand.zipfiles for apps you’ve already installed. On the new Mac you’ll want current versions anyway. - Old “Install macOS” apps in Applications, 12 GB or more each. A new Mac can’t use a macOS older than the one it came with.
- Old iPhone and iPad backups. Finder keeps them in your account’s Library, so they come across. Backups of devices you no longer have, and older backups of ones you do, can usually go; so can a device’s newest backup if it also backs up to iCloud or you’ve copied that backup to another drive. Which ones to keep.
- iOS software files (
.ipsw) in~/Library/iTunes: Finder downloads them again when it needs one.
4. What to keep
These should come across with you:
- Your documents, desktop, pictures and music, and the Photos library.
- Mail and Messages, with their attachments.
- The newest backup of each iPhone or iPad you still use, unless it also backs up to iCloud.
- Xcode Archives of builds people still run: you need them to read crash reports.
- Docker volumes, which hold databases and other data.
- Keys and settings in your home folder:
~/.ssh,~/.gitconfig,~/.config. - Projects with work you haven’t pushed. Check
git statusbefore you clear anything in them.
5. The steps, in order
- Update macOS on the old Mac. Apple asks for both Macs to be up to date, so update the new one when you set it up.
- Quit your apps, then clear what rebuilds by itself (section 2).
- Remove what you’ve finished with, empty the Trash, and restart the old Mac.
- Back it up with Time Machine. Migration Assistant can copy from that backup too, if you’d rather not have both Macs side by side.
- Turn off antivirus, firewall and VPN software until the transfer is done, as Apple advises.
- On the new Mac, open Migration Assistant: it’s offered during setup, and later in Applications › Utilities. Choose the old Mac or the backup, and untick what you don’t need.
- Afterwards, deactivate apps that count activations on the old Mac before you erase it or pass it on. In SiftMac that’s Settings › Licence › Deactivate on this Mac.
Questions
Does Migration Assistant delete anything from the old Mac?
No. It copies, and the old Mac keeps everything until you erase it.
Will my iPhone backups come across?
Yes. Finder keeps them in your account’s Library, which Migration Assistant copies with the account. Delete the ones you don’t need first, as in section 3.
How long does migration take?
Apple says a large transfer can take hours and may seem to pause now and then. The less there is to copy, the sooner it’s done.
Should I set up the new Mac from scratch instead?
You can: set it up as new, copy your files across yourself and reinstall your apps. It leaves every leftover behind, but takes longer, and you redo your settings by hand. Migration Assistant stays in Applications › Utilities if you change your mind later.
Or let SiftMac sort the old Mac first. Its free scan lists what rebuilds by itself (app caches, DerivedData, old simulators and device support files, and node_modules in projects you haven’t touched for a month or more) next to what doesn’t: used downloads, the Trash, and iPhone backups with the newest of each device marked. Each item says whether it comes back. Caches go straight away; anything that can’t rebuild waits 7 days on the Undo Shelf, which lives in your Library, so empty it with Free now before you migrate, or it comes across too. Nothing leaves your Mac.
Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works