Skip to content

Instantly share code, notes, and snippets.

@systemswizard
Last active March 11, 2025 08:27
Show Gist options
  • Save systemswizard/8a533cfb3dec60d351f86122f101a971 to your computer and use it in GitHub Desktop.
Save systemswizard/8a533cfb3dec60d351f86122f101a971 to your computer and use it in GitHub Desktop.
Uninstalls FortiClient and its components - Tested on FortiClient SSL Client 6.x-7.1.x
#!/bin/sh
# macos-uninst-forticlient.sh
# https://gist.github.com/systemswizard
# Uninstalls FortiClient and its components - Tested on FortiClient SSL Client 6.x-7.1.x
pkill FortiClientAgent
launchctl unload /Library/LaunchDaemons/com.fortinet*
rm -Rfv /Applications/FortiClient.app
rm -Rfv /Applications/FortiClientUninstaller.app
rm -Rfv /Library/Application\ Support/Fortinet
rm -Rfv /Library/Internet\ Plug-Ins/FortiClient_SSLVPN_Plugin.bundle
rm -Rfv '/Library/LaunchDaemons/com.fortinet.*'
rm -Rfv '/Library/LaunchAgemts/com.fortinet.*'
localAccounts=$(dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }')
for user in $localAccounts ;
do
rm -Rfv /Users/"$user"/Library/Application\ Support/Fortinet/
rm -Rfv /Users/"$user"/Library/LaunchAgents/com.fortinet*
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment