Uninstall Citrix

awilliams
New Contributor II

I am trying create a policy to uninstall Citrix Receiver on my macs. Unable to add uninstall.app into jamf admin due to error message "not being support in Jamf Admin". I little experience creating scripts. Trying to create script but unable get script to run. Wondering if anyone has script for uninstall citrix receiver

1 ACCEPTED SOLUTION

awilliams
New Contributor II

Thanks, forgot about "Files and Processes" section of the policy. That has worked.

View solution in original post

9 REPLIES 9

AVmcclint
Honored Contributor

One thing you can try is to package the uninstaller app via Composer and have Jamf install it to all Macs to /Utilities or /Library/mycompany/ or someplace that's not obvious to users. Then make an uninstall policy that only calls on the uninstaller via "Files and Processes". Here's the command I use to run the WebEx Productivity Tools uninstaller /Applications/WebEx/Productivity Tools/Uninstall.app/Contents/MacOS/Uninstall You could try using a similar command to launch the uninstaller. I've never run the Citrix uninstaller, so I don't know if it requires user intervention, but since it would run via policy, it would run as root and you won't have to worry about needing admin rights.

awilliams
New Contributor II

Thanks, forgot about "Files and Processes" section of the policy. That has worked.

AVmcclint
Honored Contributor

.

ShaunRMiller83
Contributor III

In case anyone on JamfNation stumbles across this post like I did.

The way I was able to remove Citrix Receiver was to package the uninstaller app with Composer as mentioned above. I then added a post flight script to run:

 /(pathtoapp)/Uninstall Citrix Receiver.app/Contents/MacOS/Uninstall Citrix Receiver --nogui

Berzinji
New Contributor II

Thank you @AVmcclint , that worked for me for removing WebEx Productivity Tools

el2493
Contributor III

@ShaunRMiller83 thanks for your help, I was trying to do the same thing but running into some issues. I had the package install the app to /Library/Application Support/CitrixDir/, made mine a postinstall script, and included the following in the script:

#!/bin/sh

#Define Location of Citrix Receiver
receiverApp="/Applications/Citrix Receiver.app"

#If Citrix Receiver is installed, uninstall it
if [ -d "$receiverApp" ]; then
    echo "Receiver installed, uninstalling"
    /Library/Application Support/CitrixDir/Uninstall Citrix Receiver.app/Contents/MacOS/Uninstall Citrix Receiver --nogui
    sleep 5
    uninstallerRunning=$(ps aux | grep "Uninstall Citrix Receiver" | grep -v "grep")
    while [ -e "$uninstallerRunning" ]; do
        echo "Uninstaller running"
        sleep 5
        uninstallerRunning=$(ps aux | grep "Uninstall Citrix Receiver" | grep -v "grep")
    done
    echo "Uninstaller not running"
    sleep 2
fi

#Delete folder created for Uninstall app
rm -rf /Library/Application Support/CitrixDir/

R_C
Contributor

Updated the formatting for the script posted above.

I took the CitrixReceiver.DMG, opened it in Composer, removed the Install PKG, and exported it as a DMG.

Then created a policy to deploy the DMG only containing "Uninstall Citrix Receiver.APP" and deployed it to /Applications.

Then set the following script to run afterwards. 

 

 

#!/bin/sh

#Define Location of Citrix Receiver
receiverApp="/Applications/Citrix Receiver.app"

#If Citrix Receiver is installed, uninstall it
if [ -d "$receiverApp" ]; then
    echo "Receiver installed, uninstalling"
    /Applications/Uninstall\ Citrix\ Receiver.app/Contents/MacOS/Uninstall\ Citrix\ Receiver --nogui
    sleep 5
    uninstallerRunning=$(ps aux | grep "Uninstall Citrix Receiver" | grep -v "grep")
    while [ -e "$uninstallerRunning" ]; do
        echo "Uninstaller running"
        sleep 5
        uninstallerRunning=$(ps aux | grep "Uninstall Citrix Receiver" | grep -v "grep")
    done
    echo "Uninstaller not running"
    sleep 2
fi

#Delete folder created for Uninstall app
rm -rf /Applications/Uninstall\ Citrix\ Receiver.app


exit 0

 

LeafarM
New Contributor III

@R_C wrote:

Updated the formatting for the script posted above.

I took the CitrixReceiver.DMG, opened it in Composer, removed the Install PKG, and exported it as a DMG.

Then created a policy to deploy the DMG only containing "Uninstall Citrix Receiver.APP" and deployed it to /Applications.

Then set the following script to run afterwards. 

 

 

 

#!/bin/sh

#Define Location of Citrix Receiver
receiverApp="/Applications/Citrix Receiver.app"

#If Citrix Receiver is installed, uninstall it
if [ -d "$receiverApp" ]; then
    echo "Receiver installed, uninstalling"
    /Applications/Uninstall\ Citrix\ Receiver.app/Contents/MacOS/Uninstall\ Citrix\ Receiver --nogui
    sleep 5
    uninstallerRunning=$(ps aux | grep "Uninstall Citrix Receiver" | grep -v "grep")
    while [ -e "$uninstallerRunning" ]; do
        echo "Uninstaller running"
        sleep 5
        uninstallerRunning=$(ps aux | grep "Uninstall Citrix Receiver" | grep -v "grep")
    done
    echo "Uninstaller not running"
    sleep 2
fi

#Delete folder created for Uninstall app
rm -rf /Applications/Uninstall\ Citrix\ Receiver.app


exit 0

 

 


Hi

How do i just copy the DMC to \Programms? I dont get it?

jhbush
Valued Contributor II

I updated this a bit for Workspaces.

#!/bin/sh

#Debug
#set -x

#Define Location of Citrix Workspace Uninstaller
workspaceApp="/Library/Application Support/Citrix Receiver/Uninstall Citrix Workspace.app"

#If Citrix Workspace is installed, uninstall it
if [ -d "$workspaceApp" ]; then
    echo "Workspace installed, uninstalling"
    /Library/Application\ Support/Citrix\ Receiver/Uninstall\ Citrix\ Workspace.app/Contents/MacOS/Uninstall\ Citrix\ Workspace --nogui
    sleep 5
    uninstallerRunning=$(ps aux | grep "Uninstall Citrix Workspace" | grep -v "grep")
    while [ -e "$uninstallerRunning" ]; do
        echo "Uninstaller running"
        sleep 5
        uninstallerRunning=$(ps aux | grep "Uninstall Citrix Workspace" | grep -v "grep")
    done
    echo "Uninstaller not running"
    sleep 2
fi

exit 0