Skip to main content
Question

Bash script to uninstall uTorrent application in Mac


Forum|alt.badge.img+3

Bash script to uninstall uTorrent application in Mac

4 replies

damienbarrett
Forum|alt.badge.img+19
  • Honored Contributor
  • 343 replies
  • August 17, 2020

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.


Forum|alt.badge.img+8
  • Contributor
  • 50 replies
  • August 18, 2020

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.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 2 replies
  • August 20, 2020

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

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


PaulHazelden
Forum|alt.badge.img+12
  • Jamf Heroes
  • 375 replies
  • August 24, 2020

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings