Use Terminal To Move Photo Library

Use terminal to move photo library to external storage

Sometimes macOS tries to help you by not letting you carry out actions that would break the system or software you’re using. There are extra levels of warnings available that you might choose to turn off or bypass.

When you have files in the Trash, select Finder > Empty Trash prompts you as to whether you really meant to empty the trash. You click Empty Trash to proceed. Holding down Option when selecting Finder > Empty Trash bypasses the warning. (You can also press Command-Option-Shift-Delete to bypass it.)

Library

But if macOS thinks a file is in use by an application or the system, even that bypass doesn’t help. When you empty the trash, your Mac will show a warning dialog that reads, “The operation can’t be completed because the item ‘name’ is in use.” Three buttons appear: Skip, Stop, and Continue.

Use Terminal To Move Photo Library From One Mac To Another

Use terminal to move photo library to icloud

Apple advises in a support note a series of actions you should take, that can be summarized as a cascading order. Try an item and then try to use Empty Trash:

  • Quit the app
  • Restart the Mac normally.
  • Restart the Mac in Safe Mode, delete startup items that might be the problem, then restart normally.
  • Start up with macOS Recovery and use Disk Utility to repair the drive.

Start up with macOS Recovery and use Disk Utility to repair the drive. You can also use the Terminal command lsof, which tracks all files in use by even the lowest of low-level parts of the system. Click Preferences. Click Use as System Photo Library. Check the box next to iCloud Photo Library. Wait for the sync to finish updating. Again, this may take a while if.

Library

You can also use the Terminal command lsof, which tracks all files in use by even the lowest of low-level parts of the system. In Terminal, type lsof | grep -i followed by a space and part of the file name, and see if it shows what app or system component still has its hooks in. (You can read more about lsof in this previous Mac 911 column.)

However, sometimes a file just doesn’t want to go, and you’ve done everything else. There’s a last-resort method you can use: Delete Immediately. Apple added this option in El Capitan after it ditched Secure Empty Trash; I documented it in late 2015.

However, it’s changed further: you can no longer trigger it anywhere in the Finder except in the Trash folder. Select one or more files in the Trash and Control-click. Select Delete Immediately and confirm the deletion. There’s no going back!

Use Terminal To Move Photo Library

This Mac 911 article is in response to a question submitted by Macworld reader Vince.

Use Terminal To Move Photo Library Files

Ask Mac 911

We’ve compiled a list of the questions we get asked most frequently along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we’re always looking for new problems to solve! Email yours to mac911@macworld.com including screen captures as appropriate, and whether you want your full name used. Every question won’t be answered, we don’t reply to email, and we cannot provide direct troubleshooting advice.