Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kennethgillen/9db8e6e529a70f1c7429f9106049c8fb to your computer and use it in GitHub Desktop.
Save kennethgillen/9db8e6e529a70f1c7429f9106049c8fb to your computer and use it in GitHub Desktop.
#!/bin/bash
# When updating this script, make the same changes to the PrinterInstallerClientUninstall Automator app
echo "Stopping application"osascript -e 'tell application "PrinterInstallerClient" to quit' || true
echo "Removing services"launchctl unload /Library/LaunchDaemons/com.printerlogic.client.plist || truelaunchctl remove com.printerlogic.client || truelaunchctl unload /Library/LaunchAgents/com.printerlogic.client.scheduled_refresh.plist || true# Remove any scheduled_refresh tasks from older versionslaunchctl remove com.printerlogic.client.scheduled_refresh || truelaunchctl unload /Library/LaunchAgents/com.printerlogic.client.scheduled_refresh.*.plist || truekillall -9 PrinterInstallerClientService || truekillall -9 PrinterInstallerClientInterface || truerm -f /Library/LaunchDaemons/com.printerlogic.client* || truerm -f /Library/LaunchAgents/com.printerlogic.client* || true
echo "Unregistering apps"pkgutil --packages | grep printerlogic | xargs -n 1 pkgutil --forget 2> /dev/null || truerm -rf /Applications/PrinterInstallerClient.app || true
echo "Removing web browser plugin"rm -f /Library/Internet\ Plug-Ins/npPrinterInstallerClientPlugin.plugin || true
echo "Deleting files"rm -rf /opt/PrinterInstallerClient/tmp || truerm -f /Applications/Printer\ Installer\ Client.app || truerm -rf /opt/PrinterInstallerClient || true
echo "Uninstallation complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment