Skip to content

Instantly share code, notes, and snippets.

@dongri
Last active February 16, 2024 15:23
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save dongri/0735e9a852093cf83212092e3fe40983 to your computer and use it in GitHub Desktop.
Save dongri/0735e9a852093cf83212092e3fe40983 to your computer and use it in GitHub Desktop.
uninstall netskope
#!/bin/sh
sudo ps aux | grep Netskope | grep -v grep | awk '{ print "kill -9", $2 }' | sudo sh
echo '[✓] Kill Netskope Process'
sudo rm -rf /Applications/Remove\ Netskope\ Client.app
echo '[✓] Removed Remove Netskope Client.app'
sudo rm -rf /Library/Application\ Support/Netskope
echo '[✓] Removed Agent of Netskope Client.app'
echo 'Successfully uninstalled.'
@sdcarter
Copy link

Small change, but I added an additional sudo with the sh in the first line. Otherwise, the command throws a few errors as it can't kill all running processes.

sudo ps aux | grep Netskope | grep -v grep | awk '{ print "kill -9", $2 }' | sudo sh

@dongri
Copy link
Author

dongri commented Jun 28, 2021

Updated

@caitlindaily
Copy link

caitlindaily commented Sep 7, 2021

Wanted to mention that for Big Sur on Mac this did not do an uninstall, but did disable Netskope, which is what I was mainly looking for 👍 Previous kill commands for older OS were not longer working on Big Sur, but this did the trick.

@dongri
Copy link
Author

dongri commented Sep 8, 2021

I'm glad it helped.

@dmorgangg
Copy link

Do you know what parameter to add if an uninstall password is required?

@dongri
Copy link
Author

dongri commented Nov 5, 2021

@dmorgangg You'll have to ask your system administrator for the password.

@gandalf239
Copy link

Thanks for this awesome script! Has truly helped me when I've been unable to blow away Netskope when needed. Have made a couple of changes which allows the software to be removed regardless of whether one has the uninstall password or not:

  1. Changed the line: sudo rm -rf /Library/Application\ Support/Netskope/ to include an asterisk ( * ) at the end.
  2. Added: echo "Y" | sudo rm -rf /Applications/Netskope\ Client.app at the end of the script (this won't run until the related services are killed).
    This totally blows away Netskope allowing me to reinstall clean.

@dbrum
Copy link

dbrum commented Apr 6, 2023

how can this be used without being prompted for the sudo password? Netskope will just be pushed down after a few hours for example and want to schedule this script to be run say every hour in case it shows up again.

@gandalf239
Copy link

gandalf239 commented Apr 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment