Skip to main content
Solved

Uninstalling Symantec Endpoint Anti-virus

  • December 11, 2013
  • 42 replies
  • 223 views

Forum|alt.badge.img+7

I am sure there are other methods to uninstall Symantec Anti-virus from a mac via Casper Policy, but this one works for my environment. I just thought I would share.

On your source computer (by source computer, I mean the computer that you use to build all your scripts/pkgs/dmgs)
1. Download the Symantec Removal Tool from Symantec. OLD LINK
[ftp://ftp.symantec.com/misc/tools/mactools/RemoveSymantecMacFiles.zip](ftp://ftp.symantec.com/misc/tools/mactools/RemoveSymantecMacFiles.zip)

  1. Extract the "SymantecRemovalTool.command" file and save it into a folder where you might keep all your scripts on the local computer. In my environment - All my computers have a folder called JAMF-CustomApps within /Library/Application Support/ NOTE: The file cannot be changed to a .sh script, when I tried I got errors.

  2. Now open Composer and drag 'n drop the "SymantecRemovalTool.command" from /Library/Application Support/JAMF-CustomApps/ into Composer window.

  3. Now create a PKG file with Composer, called "SymantecRemovalTool.PKG"

  4. Now open Casper Admin and drag 'n drop the "SymantecRemovalTool.PKG" into Casper Admin.

  5. Once you have saved the file in Casper Admin.

  6. Open the JSS and create a new policy.
    My policy looks like this:
    *General
    *
    policy name = "Uninstall - Symantec Endpoint Anti-virus"
    *Enable
    *
    Execution Frequency = Ongoing
    *Packages = SymantecRemovalTool.pkg *set to Install (Setting to Install will actually copy the .command file to the correct folder location.)
    *Maintenance = Update Inventory
    *
    File&Processes = Execute Command
    **** /Library/Application Support/JAMF-CustomApps/SymantecRemovalTool.command

Now setup Self-Service and you are ready to go.

Best answer by zmbarker

Content backfill required

42 replies

scottb
Forum|alt.badge.img+18
  • Valued Contributor
  • December 11, 2013

Actually, we added this to our SEP install policies too. We run it as a script, so I don't know why you saw errors with that? No need for use to make a .pkg as it runs as a script in JSS fine.

Ours runs before the SEP install as we also offer it in Self Service and sometimes there's remnants of old SEP on Macs. It works great and makes sure there are no "can't upgrade" errors.

Here's the top of the script I have:

#!/bin/sh
# File Name: SymantecRemovalTool.command Version=5.53
# Author: Corey Swertfager, Symantec Corporation
# Created: 10/04/2001
# Modified: 11/02/2009


mojo21221
Forum|alt.badge.img+12
  • Valued Contributor
  • December 16, 2013

@boettchs

Can you post the full script or link to it? As we are looking into this as well without pushing a .pkg.


scottb
Forum|alt.badge.img+18
  • Valued Contributor
  • December 16, 2013
Content backfill required

Forum|alt.badge.img+7
  • Author
  • Contributor
  • December 17, 2013

@mojo21221][/url - The script is already linked in the original posting. Just go to ftp://ftp.symantec.com/misc/tools/mactools/RemoveSymantecMacFiles.zip and download the script.

@boettchs][/url - The script you posted is from 2009. The link ftp://ftp.symantec.com/misc/tools/mactools/RemoveSymantecMacFiles.zip is the most current script from Dec 10, 2013

[ftp://ftp.symantec.com/misc/tools/mactools/RemoveSymantecMacFiles.zip](ftp://ftp.symantec.com/misc/tools/mactools/RemoveSymantecMacFiles.zip)


scottb
Forum|alt.badge.img+18
  • Valued Contributor
  • December 17, 2013

@zmbarker][/url - my first post showed that header. I was asked to post it, so I did.
The script I'm using is working great with SEP 11.x. I'll have a look at the other.
Thanks!

*Edit: I'm unable to grab that file on the Symantec ftp site...


Forum|alt.badge.img+7
  • Author
  • Contributor
  • Answer
  • December 17, 2013
Content backfill required

scottb
Forum|alt.badge.img+18
  • Valued Contributor
  • December 17, 2013

Thanks - at the same time I got it from Symantec. Is this the one that was having troubles with renaming to .sh and running in Casper?


Forum|alt.badge.img+7
  • Contributor
  • March 12, 2014

I packaged it in a DMG and it worked for me :D


Forum|alt.badge.img+12
  • Contributor
  • March 12, 2014

I wasn't able to get it to run properly without adding the '-A' parameter to the command. Removal script looks like this:

SymantecRemoval.command -A &
RemovalPID=`echo "$!"`
wait $RemovalPID
reboot

Forum|alt.badge.img+11
  • Valued Contributor
  • March 28, 2014

@acdesigntech can you elaborate on how your script works? do you run this after putting the SymantecRemoval.command onto the machine? thanks!


Forum|alt.badge.img+3
  • New Contributor
  • December 5, 2014

.


Forum|alt.badge.img+12
  • Contributor
  • December 5, 2014

yes you have to put the symantecremoval.command file on the Mac, then invoke it with the '-A' switch. it will tell the removal script to remove symantec from all attached drives.


Forum|alt.badge.img+9
  • Contributor
  • April 29, 2015

I think I must be missing something here. I've downloaded the latest removal tool and have it pkg in Casper. I'm able to run it in Self Service only to the point where think it kicks off the .command file. After that it hangs. I'm assuming that it's hanging, because it's expecting some input like what happens if you just run the .command file by double clicking it. I'm sure the answer is right in front of my face, but don't seem to see it. Any thoughts?


Forum|alt.badge.img+11
  • Valued Contributor
  • April 29, 2015

I put the .command file in a DMG, so that it gets dropped in the location of my choice on the machine, then use 'execute command' under Files and Processes in a JSS policy to run the script.


Forum|alt.badge.img+12
  • Contributor
  • April 30, 2015

I believe there are switches that you have to use, otherwise it will ask which drives to remove Symantec from. try using the '-A' switch I mentioned above.


roiegat
Forum|alt.badge.img+16
  • Valued Contributor
  • June 17, 2015

So I'm trying to package this uninstall command and having issues. Here's what I did:

1) Put it in a folder we keep our policies and scripts in on the machine locally.
2) Used a postinstall script to run the command :
cd <location of file>
SymantecRemovalTool.command -A

But what happens it goes into an endless loop with the following text:
" SymantecRemoval.command 7.0.34 **

WARNING: This script will remove all files and folders created by Symantec OS X products (except Symantec Adminstration Console for Macintosh files) and any files within those folders. Therefore, you will lose ALL files that reside in those folders, including any that you have created.

1 - Remove all Symantec files/folders.

2 - Quit. Do not remove any files.

Enter choice (1 or 2): "

I could run this manually and select 1 and it does the job nicely...but need to be able to automate it so it start and removes the files.

Also, have people had success with removing the file, and then installing a new version and then rebooting vs remove, reboot, install, reboot? Trying to minimize the reboots needed since we have filevault in play and would need to bypass it.


Forum|alt.badge.img+18
  • Valued Contributor
  • June 17, 2015

you could just think about editing the script and hard code in choice 1.
you could look into expect scripting.
you could just write a script to do that same things that their tool is doing.

and yes you should probably reboot its going to be much more simple than figuring all the other pieces out that you have try to do. And since Symantec decided rebooting was the best solution you should heed their advice i think.

But why not just install the new version over the old version that i have been doing for years without issue.


roiegat
Forum|alt.badge.img+16
  • Valued Contributor
  • June 18, 2015

@nessts When we install it over the old version the apps don't seem to work. You click on them to open and they bounce in the dock for 5 seconds and then go away. Live Update is the only that actually works and seems to download the update - but the other apps won't open for us to verify that things installed correctly. Hence the uninstall and re-install method. If you have a fix for the apps not working, that would be even better.


Forum|alt.badge.img+18
  • Valued Contributor
  • June 18, 2015

sorry @roiegat I have never seen that behavior. Of course I never jumped more than one version at a time, we kept up with the versions as we always needed the newest version.


Forum|alt.badge.img+4
  • Contributor
  • June 22, 2015

Hey I think i'm running into the issue with it trying to only look at the boot volume. Can some explain how to put in the -A parameter? I'm not the best at scripting but I have gone over the instructions for hours in their script and I still cannot make the change.


Forum|alt.badge.img+12
  • Contributor
  • June 22, 2015
SymantecRemoval.command -A

Forum|alt.badge.img+4
  • Contributor
  • June 22, 2015

Im pretty sure i'm doing this right, but maybe something has changed.

Once I run the PGK, self service says this:

it then just hangs there.


Forum|alt.badge.img+4
  • Contributor
  • June 22, 2015

@zmbarker Hey I found my issue here..

The link you have in the first post goes to a different command as the old one still exists under: [ftp://ftp.symantec.com/misc/tools/mactools/SymantecRemovalTool.zip](ftp://ftp.symantec.com/misc/tools/mactools/SymantecRemovalTool.zip)

This one does work correctly.


Forum|alt.badge.img+2
  • New Contributor
  • December 16, 2015

I got the tool from https://support.symantec.com/en_US/article.TECH103489.html to work by creating a policy that installs a package that copies the RemoveSymantecMacFiles.command file to /private/tmp/ and in File and Processes - Execute Command:

echo 1 | /private/tmp/RemoveSymantecMacFiles.command

It'll pipe the 1 to the command and run automatically.


scottb
Forum|alt.badge.img+18
  • Valued Contributor
  • December 17, 2015

^^^ Thanks @ardukes - that is the ticket. Worked great.