Archive for December, 2010

KBox agent removal script

December 15, 2010 2 comments

At my job, we’re using Kace’s KBox to handle our inventory and patch management (we’d like it to do more, but that’s mostly what it’s doing at this point.) One thing that I’ve noticed is that the KBox agent tracks logins and logouts. Sometimes, this process goes awry and your login will hang for two minutes until the loginwindow process hits a timeout limit, forcibly kills that process, and allows the rest of the login to proceed.

The fix in this case is to uninstall and reinstall the agent. Kace provides directions on how to uninstall the Mac agent, but it looks like the directions weren’t updated for 10.6.x, so I knocked together this script to uninstall the agent on 10.4.x – 10.7.x:


# Removes the 5.3 KBox agent

sudo /Library/StartupItems/AMPAgentBootup/AMPAgentBootup stop
sudo /Library/Application\ Support/Dell/KACE/bin/AMPctl stop 2>&1
sudo /Library/Application\ Support/Dell/KACE/bin/kagentctl stop 2>&1
sudo rm -rf /Library/Application\ Support/Dell
sudo rm -rf /Library/StartupItems/AMPAgentBootup
sudo rm -rf /Library/Receipts/AMPAgent.pkg
sudo rm -rf /var/db/receipts/
sudo rm -rf /var/db/receipts/com.kace.ampagent.plist
sudo rm -rf /Library/LaunchAgents/com.kace.AdminAlert.plist
sudo rm -rf /Library/LaunchDaemons/com.kace.ampagent.plist

# Removes the 5.1 KBox agent

sudo /Library/StartupItems/KBOXAgent/KBOXAgent stop
sudo /Library/KBOXAgent/Home/bin/kagentctl stop 2>&1
sudo /Library/KBOXAgent/Home/bin/SMMPctl stop 2>&1
sudo rm -rf /Library/KBOXAgent
sudo rm -rf /Library/StartupItems/KBOXAgent
sudo rm -rf /Library/Receipts/KBOX\ Agent.pkg
sudo rm -rf /var/kace
sudo rm -rf /var/db/receipts/
sudo rm -rf /var/db/receipts/com.kace.kboxagent.plist
sudo rm -rf /Library/LaunchDaemons/kace.smmpagent.bootup.plist

Update 3-7-2012: I’ve updated this script to accomodate uninstalling both 5.1.x agents and 5.3.x agents. The updated script and script-only uninstaller is posted here on my GitHub repo for download.


Get every new post delivered to your Inbox.

Join 298 other followers

%d bloggers like this: