Shell script used to completely remove S4B Mac

On occasion you may need to remove the S4B Mac client. Thanks to both Kam Foo Aw and Yong Lim we now have a very easy way to do so. All credit goes to them. I am just sharing the knowledge. As with all scripts use at your own discretion.

You will need to save this as a .sh file and run it with root permissions.

# SFBMac uninstall script v. 1.1
#!/bin/sh -e
sudo rm -rf /Applications/Skype\ for\
sudo rm -rf /Library/Internet\ Plug-Ins/MeetingJoinPlugin.plugin

defaults delete || true
rm -rf ~/Library/Containers/
rm -rf ~/Library/Logs/DiagnosticReports/Skype\ for\ Business_*
rm -rf ~/Library/Saved\ Application\ State/
rm -rf ~/Library/Preferences/
rm -rf ~/Library/Application\ Support/CrashReporter/Skype\ for\ Business_*
rm -rf ~/Library/Application\ Support/*
rm -rf ~/Library/Cookies/*

sudo rm -rf /private/var/db/receipts/*
rmdir ~/Library/Application\ Scripts/
find -f /private/var/db/BootCaches/* -name "*" -exec sudo rm -rf {} +

 while security delete-generic-password -l 'Skype for Business' ~/Library/Keychains/login.keychain; do :; done
killall cfprefsd