Skip to content

Instantly share code, notes, and snippets.

@alexrios
Forked from dongri/remove-fucking-tool.sh
Created May 3, 2024 15:32
Show Gist options
  • Save alexrios/9b8f7aee03c06c6487471910b308e39f to your computer and use it in GitHub Desktop.
Save alexrios/9b8f7aee03c06c6487471910b308e39f to your computer and use it in GitHub Desktop.
# Run with elevated privileges
# If you have Connect Wise Control installed, remove it. IT organizations are likely to install it (or similar tool) if they feel the need for Netskope clients.
# RE: https://saputra.org/threads/remove-screenconnect-or-connectwise-control-from-windows-mac-linux.45/
function remove_cswincom() {
thumbprint=$(ls /Library/LaunchAgents/connectwisecontrol-* | head -1 | awk -F- '{print $2}')
# Stop the ConnectWiseControl Client service
launchctl unload /Library/LaunchAgents/connectwisecontrol-${thumbprint}-onlogin.plist
# Delete the service definitions
rm -f /Library/LaunchAgents/connectwisecontrol-${thumbprint}-*.plist
# Delete the ConnectWiseControl Client files:
rm -fr /opt/connectwisecontrol-${thumbprint}.app
}
function remove_netskope_client() {
# Stop the Netskope Agent service
launchctl unload /Library/LaunchAgents/com.netskope.stagentui.plist
# Delete Netskope service definitions
rm -fr /Library/LaunchAgents/com.netskope.*
# Remove Netskope app files
rm -fr /Applications/Remove\ Netskope\ Client.app
rm -fr /Library/Application\ Support/Netskope
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment