How to uninstall Netskope Client on a Mac

  • 6 December 2023
  • 6 replies
  • 1126 views

The Netskope Client it password protected. Looking to see if any one has success with uninstaller scripts that will allow you to add those parameters to the scripts and do a clean uninstall


6 replies

Userlevel 6
Badge +16

Hello @ITGuy1 ,


Welcome to the Netskope Community.  Using the uninstall script on a password protected Mac client is documented here:

https://docs.netskope.com/en/netskope-help/netskope-client/uninstalling-the-netskope-client/

Keep in mind, you will need a support account to download the script and please note the caveat documented on the link above around Removable System Extensions. 

Hello @sshiflett 

 

Thank you for the reply and welcoming me to the Netskope community.

 

We have tried those steps in the documentation and haven't had any success as we are trying to deploy the script via our MDM (Mosyle).

Userlevel 6
Badge +16

Sorry to hear that it's not working.  Usually in that case, I will first try to run the script manually on a local machine to ensure all my parameters are correct.  If it works there then we would want to look at how it's configured in the MDM itself.  I am not familiar with Mosyle.  Does it support passing parameters to a script natively, or do you have to list the parameters in the script itself?  If it's the latter, we might have to modify the uninstall script itself. 

It runs manually as it should. Netskope Uninstaller does not support the ability to be ran as root -- which is how scripts ran from Mosyle are deployed. Below is a script that is intended for Jamf and we have sent it over to Mosyle to see if any of it can be modify to work in their ecosystem.

 

#!/bin/sh
####################################################################################################
#
# Copyright (c) 2016, Netskope, Inc.  All rights reserved.
#
#
####################################################################################################
#
# SUPPORT FOR THIS PROGRAM
#
#       This program is distributed "as is" by Netskope, Inc team. Please contact Netskope support
#       team.
#
####################################################################################################
#
# ABOUT THIS PROGRAM
#
# VERSION : 3.0
#
# NAME
# jamfuninstall.sh -- uninstall Netskope client app thru jamf
#
#####################################################################################################
# version : 1.0 , this script file is introduced for jamf based uninstallation
# version : 2.0 , [2019-Oct-10] support added for password based uninstallation
# version : 3.0 , [2023-Nov-03] modified uninstall_me to uninstall_app and corrected encoding issues
####################################################################################################
 
SCRIPT_NAME=`basename "$0"`
echo "Param1 $1 Param2 $2 Param3 $3"
 
function print_usage()
{
echo "Usage "
echo " Uninstall without password"
    echo "   jamfuninstall.sh <dummy param 1> <dummy param 2> <dummy param 3>"
echo " Uninstall with password"
    echo "   jamfuninstall.sh <dummy param 1> <dummy param 2> <dummy param 3> <password>"
}
 
if [[ $# -lt 3 ]] 
then
   echo "Insufficient arguments."
   print_usage
   exit 1
fi
 
if [[ $# -gt 3 ]]
then
INPASSWORD="$4"
fi
 
/Applications/Remove Netskope Client.app/Contents/MacOS/Remove Netskope Client uninstall_app $INPASSWORD
 
RETCODE=$?
echo "Uninstaller exited with Return code : $RETCODE"
exit $RETCODE
 

Hi @ITGuy1  Before proceeding, make sure to check Netskope's official documentation or contact their support for the most accurate information.

 

Even after dragging the application to the Trash, some files related to Netskope may remain on your system. To ensure a complete uninstallation, you can use Terminal to remove these files. Be extremely careful when using Terminal, as it allows you to make system-level changes.

 

sudo rm -rf /Library/Netskope
sudo rm -rf /Library/Application Support/Netskope
sudo rm -rf /Library/LaunchAgents/com.netskope.stagent.plist

 

Enter these commands one by one, and you may be prompted to enter your administrator password.

I’m using Workspace ONE and am also having issues removing the Netskope client from Mac Devices. The logs are not helpful:
 

2024/07/11 16:50:48.497403 nsUninstaller p67636 t259 info config.cpp:6268 Config System proxy configuration Detected , System proxy Count 1,Pac Server Host 127.0.0.1

2024/07/11 16:50:48.497618 nsUninstaller p67636 t259 info proxy.cpp:502 ProxyInfoReader 127.0.0.1 resolved to 127.0.0.1

2024/07/11 16:50:48.497690 nsUninstaller p67636 t259 info proxyUtils.cpp:1017 proxyUtils User configured reachable proxy count 0

2024/07/11 16:50:48.497772 nsUninstaller p67636 t259 info config.cpp:6340 Config Total active proxy Count 1, Active Proxy List : 127.0.0.1:9000  

Total proxy Count 1, Full Proxy List :127.0.0.1:9000  

2024/07/11 16:50:48.815997 nsUninstaller p67636 t259 info uninstallUtils.cpp:156 nsuninstallUtils uninstall proxy action return code 3328

2024/07/11 16:50:48.816024 nsUninstaller p67636 t259 error uninstallUtils.cpp:158 nsuninstallUtils user cancelled the network extension uninstallation

2024/07/11 16:50:48.816037 nsUninstaller p67636 t259 error main.mm:63 uninstaller sub task Exit uninstaller status 1

I’ve already removed the profile to allow the Network extension and confirmed that it is no longer active, so I’m not sure why that would prevent the uninstall.

 

I’ve tried with the jamf script and with the one liner on the site, both give the same error. Although if I run them locally with an admin account they work fine. I’ve asked our Network team to open a case, but figured I’d post here if anyone has any recommendations. 

Reply