Skip to main content
Question

Help Deleting a File


Forum|alt.badge.img+2

Need to delete an application and then reinstall a newer version. Tried a script:

#!/bin/bash

rm -rf /Applications/PCClient.app

It didn't work. Tried to execute it as a command. Issued it over Self Service and couldn't get it to work on my laptop.

If it matters, we're running our JSS on a Windows server.

4 replies

bpavlov
Forum|alt.badge.img+18
  • Esteemed Contributor
  • 1206 replies
  • February 7, 2015

Is the script executable?

If you do the following in Terminal:
ls -la /path/to/script.sh

What do you get?


bentoms
Forum|alt.badge.img+35
  • Legendary Contributor
  • 4331 replies
  • February 7, 2015

@markbgomez, did you deploy the app via a DMG?

If so, you in Casper Admin... Index the DMG & then tick "Allow this dmg to be uninstalled via policy or remote"

Then create a policy or script that removes the old version & installs the new.

Even if it wasn't deployed via a DMG, you could create one of the old app & do the above.


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • 1 reply
  • February 8, 2015

Thanks. I'll test both of those on Monday. The app wasn't deployed by DMG, but I could try creating one.


davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • 1811 replies
  • February 8, 2015

Hi, if its just a one-liner I would add it straight into the policy, rather than running a separate script. The syntax all looks fine to me and it should be running as root if its via Casper.

I would look at the policy logs as that would normally tell you the error / reason why (e.g. no such file or directory, permission denied etc).


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings