Uninstall Kinect Drivers

How to uninstall Kinect drivers on your Mac

This post is for all the people looking to remove all the Microsoft Kinect drivers for Mac that were included in previous setup tutorials. This includes instructions on how to uninstall XQuartz, Cmake, MacPorts, OpenNi, NiTE and SensorKinect (as well as upgrading Xcode). If you’ve had trouble getting your Kinect setup on Mac OS X 10.8 (Mountain Lion) working, or are looking to migrate to setting up your Kinect in Mac OS X 10.9 (Mavericks), then this tutorial is for you.

Please note: my tutorial for setting up Microsoft Kinect in Mac OS 10.9 (Mavericks) is coming very soon. I heavily suggest following this tutorial beforehand to ensure you have a clean slate for your Kinect installation in Mavericks.

If you have any questions, issues, or comments, please feel free to post them at the bottom, and follow me on Twitter to keep abreast of any updates.

Need to uninstall just one? Skip straight down the page to uninstall: XQuartz, CMake, MacPorts, OpenNi, NiTE, SensorKinect, or see how to update Xcode

Uninstall XQuartz

1. Open the ‘Terminal’ application on your Mac: Applications / Utilities / Terminal
2. Paste in the command:

launchctl unload -w /Library/LaunchAgents/org.macosforge.xquartz.startx.plist

3. Press Return then paste in the command:

sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /private/etc/*paths.d/*XQuartz

4. Press Return again, and enter your password when prompted. Then finally paste this last line of code and press Return one last time:

sudo pkgutil --forget org.macosforge.xquartz.pkg

Uninstall CMake

1. Open the ‘Terminal’ application on your Mac: Applications / Utilities / Terminal, and type in the following:

sudo rm /usr/bin/ccmake /usr/bin/cmake /usr/bin/cmake-gui /usr/bin/cmakexbuild /usr/bin/cpack /usr/bin/ctest

2. Press return and enter your password to commit.

3. Next find your CMake app: Applications / CMake 2.8-10

4. Throw it in your Trash, and Empty Trash to remove it.

Uninstall MacPorts

When you uninstall MacPorts, you will also uninstall Libtool and LibUSB. Please note: if you are using MacPorts for things besides the Kinect, then you may wish to try upgrading MacPorts first, as you will more than likely uninstall other associated dependencies.

1. Open the ‘Terminal’ application on your Mac: Applications / Utilities / Terminal

2. Paste in the command:

sudo port -fp uninstall installed

3. Press Return and enter your password when asked.  There’s a good chance you will receive the message sudo: port: command not found. This is fine – it just means you didn’t have any active ports set up.

4. Next paste in the (quite long) command:

sudo rm -rf \
/opt/local \
/Applications/DarwinPorts \
/Applications/MacPorts \
/Library/LaunchDaemons/org.macports.* \
/Library/Receipts/DarwinPorts*.pkg \
/Library/Receipts/MacPorts*.pkg \
/Library/StartupItems/DarwinPortsStartup \ /Library/Tcl/darwinports1.0 \
/Library/Tcl/macports1.0 \
~/.macports

5. Once again, press Return and you should be done. Clean as a whistle!

Uninstall OpenNi

To uninstall OpenNi, you will need to locate the original OpenNi folder you downloaded (or the zip you can uncompress). The title of the folder will be something like OpenNI-Bin-Dev-MacOSX-v1.5.4.0. If you’re have trouble finding this, tweet me for help.

1. Open the ‘Terminal’ application on your Mac: Applications / Utilities / Terminal

2. Next type cd into the Terminal window, and then add a space. Next drag the OpenNi folder from your Mac’s Finder window, onto the Terminal window to quickly add the path.  It’ll end up looking like this:

Uninstall OpenNi for Kinect on Mac

3. Hit the Return key and then paste in the following command:

sudo ./install.sh -u

4. Once more, hit the Return key, and enter your password when prompted. If successful, you should then see the following:

Uninstalling OpenNI
****************************
unregistering module 'libnimMockNodes.dylib'...dyld: Library not loaded: /opt/local/lib/libusb-1.0.0.dylib
Referenced from: /usr/lib/libOpenNI.dylib
Reason: image not found
./install.sh: line 139:  6396 Trace/BPT trap: 5       $INSTALL_BIN/niReg -u $INSTALL_LIB/$module
unregistering module 'libnimCodecs.dylib'...dyld: Library not loaded: /opt/local/lib/libusb-1.0.0.dylib
Referenced from: /usr/lib/libOpenNI.dylib
Reason: image not found
./install.sh: line 139:  6398 Trace/BPT trap: 5       $INSTALL_BIN/niReg -u $INSTALL_LIB/$module
unregistering module 'libnimRecorder.dylib'...dyld: Library not loaded: /opt/local/lib/libusb-1.0.0.dylib
Referenced from: /usr/lib/libOpenNI.dylib
Reason: image not found
./install.sh: line 139:  6399 Trace/BPT trap: 5       $INSTALL_BIN/niReg -u $INSTALL_LIB/$module
removing include files...OK
removing executables...OK
removing shared libraries...OK
Removing .Net wrappers...
No assemblies found that match: OpenNI.net
Assemblies uninstalled = 0
Failures = 0
removing java bindings...OK
*** DONE ***

5. At this point, you can then trash the OpenNi folder you located, but to be honest, I’d suggest backing it up just in case (as it’s not publicly available anymore).

Uninstall NiTE

Uninstalling NiTE is quite similar to uninstalling OpenNi.

1. Open the ‘Terminal’ application on your Mac: Applications / Utilities / Terminal

2. Next type cd into the Terminal window, and add a space. Next drag the NiTE folder from your Mac’s Finder, onto the Terminal window to add the path like so:

Uninstall NiTE for Kinect on Mac

3. Hit the Return key and then paste in the following command:

sudo ./uninstall.sh

4. If all went well, you should see the following text in the Terminal window:

dyld: Library not loaded: ../../Bin/x64-Release/libOpenNI.dylib
Referenced from: /usr/local/bin/niReg
Reason: image not found
./uninstall.sh: line 9:  6559 Trace/BPT trap: 5       niReg -u $fmod
dyld: Library not loaded: ../../Bin/x64-Release/libOpenNI.dylib
Referenced from: /usr/local/bin/niReg
Reason: image not found
./uninstall.sh: line 13:  6562 Trace/BPT trap: 5       niReg -u $hmod
rm: /usr/share/java/com.primesense.NITE.jar: No such file or directory
Done!

Uninstall SensorKinect

Once again, this is very similar to uninstalling NiTE and OpenNi, but pay close attention to Step 2!

1. Open the ‘Terminal’ application on your Mac: Applications / Utilities / Terminal

2. Then type cd into the Terminal window, and add a space. Now find your SensorKinect folder, and then navigate to the following folder inside: SensorKinect-unstable / Bin / Sensor-Bin-MacOSX-v5.1.2.1. Drag that last folder into the Terminal window to add the path.

Uninstall SensorKinect on Mac

3. Hit the Return key and then paste in the following command:

sudo ./install.sh -u

4. Press Return again and enter your password when prompted. If everything worked, you should see the following text:

Uninstalling PrimeSense Sensor
******************************
unregistering module 'libXnDeviceSensorV2KM.dylib' from OpenNI..../install.sh: line 155: /usr/bin/niReg: No such file or directory
unregistering module 'libXnDeviceFile.dylib' from OpenNI..../install.sh: line 155: /usr/bin/niReg: No such file or directory
removing shared libraries...OK
removing executables...OK
removing config dir...OK
*** DONE ***

 

Upgrade Xcode

Finally, you won’t need to uninstall Xcode, but you will need to make sure it’s up to date.

1. Follow this link to Xcode in the Mac App Store.
2. Click the Update button to upgrade Xcode to the latest version (v5.0.2 at the time of writing).
Note: If you see the word Installed then you’re already up to date, and if you see the word Install then chances are you don’t have Xcode, so tap the button to download and install.

Congratulations, you made it. Everything that’s been, has now been undone.  Feel free to trash your installation folders (or back them up if you’re smart), and you can now start afresh with a clean Kinect installation.

13 Comments

Submit a Comment
  • Reply

    Carolina

    Is the mavericks tutorial coming soon? 🙁 I haven’t been able to set up my kinect and can’t wait! 😛

  • Reply

    Diego

    Hi men.
    i have the next problem
    in the terminal when i paste sudo ./install.sh -u
    appears this MacBook-Air-de-xxx:OpenNI-Bin-Dev-MacOSX-v1.5.7.10 victormontiglio$ sudo ./install.sh -u
    sudo: unable to execute ./install.sh: Operation not permitted
    what i can do=?
    thx

  • Reply

    Brent

    Hi Glen, do you foresee the 360 Kinect model 1473 being usable on Mac OSX Mavericks in the near future? I had to but windows and partitioned my macbook pro and would be ecstatic if I could remove windows from my mac someday. 🙂

    Thanks,

    Brent

    • Reply

      Glen McPherson

      I wouldn’t count on it Brent, but I definitely feel ya on this issue.

  • Reply

    Tim

    HI Glen – I had trouble with the installs, so thought I would uninstall everything and try again, however, when following the instructions, I get the following message in Terminal
    -bash: [stag_code: command not found
    Can you help?

    Many thanks
    Tim

    • Reply

      Glen McPherson

      Apologies, the WordPress theme for this site was broken and inserting junk code. If you want to give it another go now, everything should be fixed.

  • Reply

    mb

    How about yosemite?

  • Reply

    doyeon

    Thank you very much!! perfect article!!

  • Reply

    karlene

    I try to uninstall xquarts as you said. however when I put in the second line of code and the password field come up it has a key icon next to it. It will not let me type in my password. Any suggestion? Thank you

    • Reply

      karlene

      I meant xquartz

  • Reply

    karlene

    I tried again and got to put in my password then press return after I put in the last code. It just say my son’s and my name and that all. Does this mean that xquartz is now uninstall with all of it’s filename also. Thank

Leave a Reply to doyeon Cancel Reply

Your Comment