| Solution | This script will uninstall FortiClient if it was installed via the standard macOS package installer (PKG) method. - Open a text editor (e.g., TextEdit) and create a new document.
- Add the following script to the document:
Script: #!/bin/sh # Uninstall FortiClient.sh | uninstall_forticlient.sh # This script will completely uninstall FortiClient and all supporting components pkill FortiClientAgent launchctl unload /Library/LaunchDaemons/com.fortinet* rm -Rfv /Applications/FortiClient.app rm -Rfv /Applications/FortiClient Uninstaller.app rm -Rfy /Library/Application Support/Fortinet rm -Rfy /Library/Internet Plug-Ins/FortiClient_SSLVPN_Plugin.bundle rm -Rfy/Library/LaunchDaemons/com.fortinet.f forticlient.vpn.plist' rm -Rfy /Library/LaunchDaemons/com.fortinet.forticlient, rm -Rfv '/Library/LaunchDaemons/com.fortinet.fortic plist' .fssoagent launchdaemon.plist' rm -Rfy /Library/LaunchDaemons/com.fortinet.forticlient.epctrl.plist' rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticlie rm -Rfv '/Library/LaunchDaemons/com.fortinet.forticl localAccounts=$(dscl. list /Users UniqueID | awk '$2 > 500 print $1}') for user in $localAccounts; do rm -Rfy /Users/"$user"/Library/Application Support/Fortinet/ done - Save the document with a .sh extension, for example, 'uninstall_forticlient.sh'. Note that If it does not allow to save with .sh, try to save the .rtf extension first and later change to .sh by renaming it.
- Open Terminal on the Mac.
- Navigate to the folder where the script is saved, using the ‘cd’ command. For example, if it is saved on the Desktop, navigate there using:
- Make the script executable:
- Run the script with sudo privileges to uninstall FortiClient:
It will be possible to enter the admin password to execute the script with sudo. This script will locate and remove FortiClient application files and related configuration files. Use it with caution and ensure to have a backup of any important data or configurations associated with FortiClient before running the script. |