Bash script to uninstall uTorrent application in Mac

VincentBoidyo
New Contributor II

Bash script to uninstall uTorrent application in Mac

4 REPLIES 4

damienbarrett
Valued Contributor

You could add it as a restricted process which would not allow it to run. This is how I've been managing P2P filesharing apps for years. If you search JamfNation, you'll find some threads where we discuss all this.

snovak
Contributor

Quick and dirty:

#!/bin/sh
find / -iname "utorrent.app" -exec rm -fr {} ;

This will do a case insensitive search of the whole drive for 'utorrent.app'

What might be a bit better is:

#!/bin/sh
find / -iname "*utorrent*.app" -exec rm -fr {} ;

This will do wildcarding on the name so 'utorrent web.app' would get caught.

And if you want to get a little mean:

#!/bin/sh
find / -iname "*Contents/MacOS/*utorrent*" -exec rm -fr {} ;

This will look for the actual binary inside of the .app and delete it, rendering the executable unrunnable. Kids are clever, so they may figure out that they can rename 'utorrent.app' to something else to skirt '.app' methods, but very few of them are probably fluent enough in macOS to realize what all is included inside of an app.

VincentBoidyo
New Contributor II

find / -iname "Contents/MacOS/utorrent*" -exec rm -fr {} ;

Will the above cmd remove any files related to ~Libary/*?

PaulHazelden
Valued Contributor

I would set it as a restricted process, this will allow you to find it and Kill the process. Then under the Options in the Restricted processes, you will find a delete the App option. If you check that, the App will be deleted, wherever it is. It could be on a pen drive/External Drive/ Server/User account, If the User runs the process it will be deleted from wherever it is.
You even get the option to have an email sent out telling someone of the violation.