Skip to content

Instantly share code, notes, and snippets.

@kevinpapst
Last active December 13, 2022 16:30
Show Gist options
  • Save kevinpapst/73d5b510d0d9c343eb152a5025afc785 to your computer and use it in GitHub Desktop.
Save kevinpapst/73d5b510d0d9c343eb152a5025afc785 to your computer and use it in GitHub Desktop.
Remove Forticlient VPN from Mac
#!/bin/sh
# Uninstall FortiClient.sh
# This script will completely uninstall FortiClient and all supporting components
# Why the heck does this company not ship a proper uninstaller?
pkill FortiClientAgent
launchctl unload /Library/LaunchDaemons/com.fortinet*
launchctl unload /Library/LaunchAgents/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/LaunchAgents/com.fortinet.forticlient.*'
#rm -Rfv '/Library/LaunchAgents/com.fortinet.forticlient.credential_store.plist'
#rm -Rfv '/Library/LaunchAgents/com.fortinet.forticlient.fct_launcher.plist'
#rm -Rfv '/Library/LaunchAgents/com.fortinet.forticlient.vpn.vpn_control.plist'
rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticlient.*'
#rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticlient.vpn.plist'
#rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticlient.wf.plist'
#rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticlient.fmon.plist'
#rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticlient.epctrl.plist'
#rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticlient.appfw.plist'
#rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticlient.fssoagent_launchdaemon.plist'
localAccounts=$(dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }')
for user in $localAccounts ;
do
rm -Rfv /Users/"$user"/Library/Application\ Support/Fortinet/
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment