I helped a family member upgrade to a newer iPhone and make some room so that the internal storage does not run out.

They had Nextcloud installed on the current phone, but due to limitations of the Nextcloud iOS app, the backups only take place if the app itself is open, meaning that we had hundreds of photos and videos that were not yet backed up.1

The network was slow and I was in a time crunch, so I opted to copy the media off of the phone by connecting the iPhone to my laptop over a Lightning cable. After entering the PIN on the phone again and approving the connection, I could see the iPhone in my file manager, but opening it would show nothing at all. This was very unusual as other iPhones I used in the past just worked on my laptop.

This is what you'd expect to see when connecting an iPhone to a PC.
This is what you'd expect to see when connecting an iPhone to a PC.

Rebooting the phone and connecting it again did nothing. Different known good Lightning cables did not improve things, either. Even a separate Windows 10 machine could not see any images, so it wasn’t a Linux thing.

Various Apple-related posts online were devoid of useful advice.2

I was not ready to give up just yet and I finally stumbled upon this Ask Ubuntu answer. This had potential, so I gave it a go, and I’m happy to report that it worked on my Fedora Linux machine!

These are the steps that I took. The commands need to be run in a terminal window.

Tested with Fedora Linux 40.

  • install the necessary packages
    • on Fedora, run sudo dnf install -y ifuse libimobiledevice libimobiledevice-utils
  • connect your iPhone to your PC
    • if your phone is not yet paired, then run idevicepair pair
    • if it’s already paired, verify the connection by running idevicepair validate
  • mount your phone to an empty folder of your choice
    • if an empty folder does not exist, run mkdir ~/my-iphone (use any folder name that you want)
    • to mount the phone, run ifuse ~/my-iphone
  • you can now browse your media via your file manager or terminal by navigating to ~/my-iphone
    • photos and videos taken by the camera will be in the DCIM folder
    • other folders, such as Photos and Downloads may also interest you
    • to make a full copy of your phone to a folder named iphone-backup, run cp -r ~/my-iphone ~/iphone-backup
    • alternative way to create a full backup: rsync -aAXv ~/my-iphone ~/iphone-backup
  • once you’re done, unmount the iPhone by running umount ~/my-iphone
  • it is now safe to disconnect your iPhone from the PC
The directory listing of an iPhone.
The directory listing of an iPhone.
Photos are located under DCIM folder, nested into a bunch of subfolders.
Photos are located under DCIM folder, nested into a bunch of subfolders.
Ah yes, USB 2.0 speeds.
Ah yes, USB 2.0 speeds.

If you have copied everything over and want to make more space on your phone using this method, then you need to delete files under the DCIM folder and the cached thumbnails under the PhotoData folder. iOS seems to generate thumbnails for the photos you take and even if you delete all the actual photos off of the device, then the photo thumbnails will still show up in the Photos app and elsewhere. This confused the hell out of me after I deleted the backed up photos off the phone the first time.

Thumbnails are in a separate folder.
Thumbnails are in a separate folder.

Alternatively, you can just delete files from the Photos app on the phone itself to avoid this nuance.

Linux has its flaws, but at least it provides you with the power and tools needed to get you out of tricky situations.


  1. I can’t wait for Immich to get a stable release… ↩︎

  2. Apple and Microsoft related forums are the worst for getting an actual solution to your problem, which is in stark contrast to FOSS/Linux related discussions. ↩︎