How to temporarily block iCloud sync (nsurlsessiond) while traveling

I use iCloud to sync data on my Macs. This way, I can access all my work files when I’m bouncing between my machines and out on the road. However, the other day I ran into a huge problem. There is no simple way to simply pause iCloud sync.

This boggles my mind and is a huge problem when you are traveling. Below I’ll share a few different solutions that worked for me to fix this.

Note: I use Blackblaze for backups of my data. There is a big difference between syncing and backups offsite. I always recommend doing both.

iCloud trying to sync large volume of data over cellular

I was at the Mazda dealer getting my car serviced and took my MacBook Pro with me so I could keep working. The problem is most car dealerships have crappy Wi-Fi. Mine is no exception. So I tether to my phone as I always do when I’m in a bad Wi-Fi situation.

It had been over 100 degrees here in Arizona for the past couple of weeks, so I had been primarily working inside, not on my MacBook Pro. As soon as logged into my computer in the Mazda dealer, iCloud immediately tried to start syncing over 6 GB worth of data. Yikes!

iCloud syncing large amount of data
iCloud syncing large amount of data

I pay for cellphone data usage by the GB, so this was not going to work. Also, it was pretty much killing my tethered connection, making it unusable.

Unfortunately, in the iCloud settings, there is no way to simply pause this activity temporarily. You can uncheck it completely from system preferences, but this causes other problems and more work later.

If you choose to keep a local copy, your files in iCloud Drive are copied to a folder called iCloud Drive (Archive) in your home folder. Then you have the option to move any files that were in your iCloud Desktop and Documents, back to your new local Desktop and Documents.

https://support.apple.com/en-us/HT206985

Taking a look at the activity monitor, I could see that there was a process called nsurlsessiond, which was being tied to the network activity from iCloud sync. I could terminate the process but it would simply start right back up again.

nsurlsessiond Mac process
nsurlsessiond Mac process

After going down this rabbit hole and not really getting any work done during my trip, I figured out a few solutions to this problem that works pretty well.

How to block iCloud sync temporarily

Below are a few different ways to block and or pause iCloud syncing on your Mac.

Option 1 – Create a .nosync file

The first thing you can try is creating a blank .nosync file and dropping it in the folder(s) that you need to stop syncing to iCloud. If you have one or two folders, this might be a quick solution for you.

This will technically be a hidden file, so you might need to press Command+Shift+Dot to show hidden files on your Mac.

Mac .nosync file
Mac .nosync file

Option 2 – Use the TripMode app

The second option is to use a Mac app called TripMode. This app allows you to easily stop background apps and updates from draining your data and speed when you most need them. For example, when you’re tethering to your phone with a hotspot or public Wi-Fi.

If you are traveling a lot, I highly recommend simply purchasing this app. It’s amazing, and they have a free trial that is unlimited for seven days. This gives you the ability to try it and see if it works for you. The app only costs $9.00.

One thing I love about the app is that it only takes a few minutes to configure it. Turn it on, and it will block internet access for everything except for what you allow. For example, I allowed internet access for Slack, Chrome, Trello, and didn’t for iCloud. This ensured it wasn’t allowing iCloud to access the internet, and therefore, could no longer sync the data.

Use TripMode app to block iCloud sync
TripMode app

Option 3 – Unload processes with a shell script

Your final option would be to use the following script in the terminal. Basically this stops the nsurlsessiond processes until the next reboot.

#! /bin/sh
launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist
launchctl unload /System/Library/LaunchAgents/com.apple.nsurlsessiond.plist
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlsessiond.plist
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist

Simply copy and paste the shell script above into the terminal and hit Enter.

Unload com.apple.nsurlsessiond.plist
Unload com.apple.nsurlsessiond.plist

Note: If you get a warning about System Integrity Protection, you might need to turn it off for the script to work. Do this at your own risk.

Summary

Hopefully one of the above solutions works for you to temporarily block iCloud sync. If you have any alternate methods to do this, I would love to hear what they are below in the comments. Maybe one day, Apple will give us an easy “Pause Syncing” button. That would be nice.

Brian Jackson

I craft actionable content and develop performance-driven WordPress plugins. Connect on Twitter or subscribe to my newsletter (twice a month, no spam).

5 thoughts on “How to temporarily block iCloud sync (nsurlsessiond) while traveling”

  1. Great suggestions! I’ve heard of TripMode before. I’d definitely use it—although due to the pandemic I’m wondering when that’ll be a reality again.

    Reply
    • Ya definitely recommend it! But ya, like you said. Traveling has pretty much come to a halt for a lot of people right now. But eventually, we’ll get back to normal, or at least a new normal.

      Reply
  2. I desperately needed the TripMode app and it wasn’t appearing in the App Store. I don’t feel savvy enough to do a shell script :(

    Reply

Leave a Comment