Cisco anyconnect command line uninstall script?

tcandela
Valued Contributor II

The Cisco anyconnect uninstaller ( from gui or running uninstaller from command line) has popup box that has two options, 'uninstall' or 'quit'. Is it possible via command line to have it choose 'uninstall'?

I have a simple script to uninstall, but in testing the script I get the popup box, so I'm assuming running the script via Casper it will not work due to the popup box.

1 ACCEPTED SOLUTION

jhbush
Valued Contributor II

@tcandela

sudo bash /opt/cisco/anyconnect/bin/vpn_uninstall.sh

worked for me using version 3.x

View solution in original post

9 REPLIES 9

jhalvorson
Valued Contributor

The following worked for an older Cisco VPN client we used to use.

yes | /usr/local/bin/vpn_uninstaller

maybe your script would work with

uninstall | /path/to/command

jhbush
Valued Contributor II

@tcandela

sudo bash /opt/cisco/anyconnect/bin/vpn_uninstall.sh

worked for me using version 3.x

tcandela
Valued Contributor II

I currently have a script that does

cd /Applications/Cisco/Uninstall AnyConnect.app/Contents/MacOS
./Uninstall AnyConnect
--- but then see the popup box

I looked for the path that @jhalvorson provided but do not see it

but the path that @jhbush1973 provided I see.

currently i'm looking on a computer running AnyConnect version 2.5.1025

going to check other computers running 3.1

tcandela
Valued Contributor II

on some other computers, in addition to vpn_uninstall.sh in the /opt/cisco/anyconnect/bin directory there is also

anyconnect_uninstall.sh
dart_uninstall.sh
websecurity_uninstall.sh

do these also need to be run, or just the vpn_uninstall.sh ?

RobertHammen
Valued Contributor II

@tcandela That depends if those optional install components have been installed or not.

tcandela
Valued Contributor II

WithIn the /Applications folder, the Cisco folder contains an uninstaller that uninstalls everything except for DART (/applications/Cisco/....),

DART (has its own seperate uninstaller).

I'll try scripting the uninstaller from this location

tcandela
Valued Contributor II

sudo bash /opt/cisco/anyconnect/bin/anyconnect_uninstall.sh and then dart_uninstall.sh

dwatkins
New Contributor

how can i get cisco anyconnect uninstalled including the dart to perform a upgrade from self service?

iJake
Valued Contributor

What is your requirement to uninstall to perform an upgrade? Install on top and let the AnyConnect installer handle it.