We might wonder how to disable the USB ports on Mac to prevent data copy to external USB mass storage devices. The USB kext on os x is loaded at the time of start of the system, this can be loaded / unloaded using kextload or kextunload command. To disable USB port on Mac , follow below steps: On Macs running Mountain Lion, Mavericks and Yosemite : Unmount any connected USB devices to the system by running below command $ diskutil unmount /Volumes/USBDISK. Now unload the USB related kernel extensions in the following order using kextunload command. sudo kextunload -b com.apple.driver.AppleUSBCardReader sudo kextunload -b com.apple.driver.AppleUSBODD sudo kextunload -b com.apple.iokit.IOUSBMassStorageClass This wil...