macOS Migration Assistant: a migration is already in progress
I’ve been setting up a new Mac and wanted to migrate some files and settings from my existing machine. Nothing particularly unusual. Apple’s Migration Assistant is designed for precisely this job, and generally does it rather well.
Except, this time, it didn’t. In fact, it stung me twice. I tried to migrate from my laptop, and it failed… a lot. So much, that I gave up.
Then I tried again, and this time it failed, but Migration Assistant presented me with a rather unhelpful error:
Cannot migrate from this machine as a migration is already in progress.
Which was interesting, because there most definitely wasn’t a migration in progress.
After a bit of digging, I found the culprit, and eventually managed to fix it. Here’s how.
The culprit: In-Flight
It turns out that macOS maintains a queue of migration operations in the following directory:
/Library/SystemMigration/Queue/
When a migration is being processed, macOS can create a file called In-Flight in this directory.
Under normal circumstances, this is all handled automatically. However, if a migration is interrupted or doesn’t clean up properly, the file can apparently be left behind.
The result? Migration Assistant thinks there’s already a migration in progress and refuses to start another.
Sure enough, I found an In-Flight file sitting in the queue.
The obvious solution was to delete it.
Simple, right?
Attempt one: just delete the file
I started with Finder.
Nope. Operation not permitted.
Fine. Terminal it is.
cd /Library/SystemMigration/Queue
sudo rm -i In-Flight
Nope again.
rm: In-Flight: Operation not permitted
Even with sudo, macOS wouldn’t let me remove it.
This is because the migration directory is protected by macOS security mechanisms, including System Integrity Protection (SIP). Even the root user doesn’t have unrestricted access to protected parts of the filesystem.
So, more drastic measures were required.
Attempt two: Recovery Mode
My Mac is an Apple Silicon machine, so booting into Recovery Mode involves:
- Shutting down the Mac completely.
- Holding down the power button until the startup options appear.
- Selecting Options, then Continue.
- Authenticating when prompted.
- Opening Terminal from the Utilities menu.
Recovery Mode provides a separate environment for maintaining and repairing macOS, including accessing the startup disk without booting the normal operating system.
I opened Terminal, navigated to the migration directory and…
Nothing.
The directory wasn’t there.
In fact, looking in /Library/SystemMigration/Queue from Recovery Mode was completely misleading.
And this was where things got interesting.
The missing Data volume
Modern versions of macOS use APFS (Apple File System), which separates the operating system and user data into different volumes.
Broadly speaking, these are:
- Macintosh HD — the sealed system volume containing macOS.
- Macintosh HD - Data — the writable volume containing user data, applications and other mutable files.
When macOS is running normally, these volumes are presented as a single unified filesystem.
But in Recovery Mode, things look rather different.
Running:
ls -la /Volumes/
showed me Macintosh HD, macOS Base System and Preboot.
But there was no Macintosh HD - Data.
This explained why I couldn’t find the migration queue. I wasn’t looking at the filesystem that contained it.
So where had my Data volume gone?
FileVault enters the picture
The answer was encryption.
My startup disk was encrypted using FileVault, and although the system volume was visible, the Data volume was still locked.
The first step was to identify the correct APFS volume:
diskutil apfs list
This displays the APFS containers and their constituent volumes, including each volume’s name, role, identifier and encryption status.
Among the results was my Data volume, marked as encrypted and locked.
The solution was to unlock it manually:
diskutil apfs unlockVolume disk3s5
Important: disk3s5 is just an example. Use the actual identifier of your Data volume, as reported by diskutil apfs list.
After supplying my FileVault credentials, the volume was unlocked.
If it doesn’t mount automatically, you can mount it using:
diskutil mount disk3s5
Now, running:
ls -la /Volumes/
showed the missing Data volume.
Progress!
Finally deleting In-Flight
With the Data volume unlocked and mounted, I could finally navigate to the directory I actually needed.
ls -laO "/Volumes/Macintosh HD - Data/Library/SystemMigration/Queue/"
There it was. The troublesome In-Flight file.
A couple of important points before going any further:
- Make sure you’re working on the correct volume. Your mounted volume might have a different name.
- Make sure there really isn’t an active migration running.
- Have a current backup before modifying migration-related system files.
Having established that the file was a leftover from an earlier migration attempt, I removed it:
rm -i "/Volumes/Macintosh HD - Data/Library/SystemMigration/Queue/In-Flight"
Unlike my earlier attempts, this time it worked.
No need to disable SIP. No need to change the security configuration of the Mac.
Just access the correct filesystem from the correct environment.
Did it work?
I restarted the Mac normally, opened Migration Assistant and tried again.
Success!
Migration Assistant no longer complained about an existing migration and was happy to proceed.
One tiny file had effectively blocked the entire migration process.
The short version
If you encounter the error “Cannot migrate from this machine as a migration is already in progress”, and suspect a stranded In-Flight file, here’s the process that worked for me:
- Check whether
/Library/SystemMigration/Queue/In-Flightexists. - Make sure no migration is actually in progress, and have a backup.
- Boot into macOS Recovery.
- Open Terminal and use
diskutil apfs listto locate your Data volume. - If it’s encrypted and locked, unlock it with
diskutil apfs unlockVolume <identifier>. - Mount the Data volume if necessary.
- Locate the
In-Flightfile under the mounted Data volume’sLibrary/SystemMigration/Queuedirectory. - Remove the stranded file, restart and retry Migration Assistant.
These instructions describe the fix on my Apple Silicon Mac. Volume names, identifiers and security behaviour may differ on other machines or macOS versions. If deletion is still refused, don’t assume that disabling SIP is the next step.
A final thought
The frustrating part of all this wasn’t particularly that macOS prevented me from deleting the file. The security protections are there for good reasons.
It was that Migration Assistant knew something was wrong, but offered precisely no useful indication of how to resolve it.
A single abandoned file was apparently sufficient to stop an entire migration, and the solution required understanding three separate aspects of macOS:
- System Integrity Protection
- APFS system and Data volumes
- FileVault encryption and volume unlocking
All to delete a file.
Still, at least I learned something.
And hopefully, if you’ve stumbled across this post because Migration Assistant is refusing to cooperate, it’ll save you a bit of head-scratching.