Skip to main content
Question

uninstalling a package from the command line


Forum|alt.badge.img+31
  • Honored Contributor
  • 2721 replies

from the help file:

bash-3.2# jamf help uninstall

Usage: jamf uninstall -target <target volume> -id <JSS Package ID> [-fut] [-feu]

-target The target drive to uninstall the package from

-id The ID of the package in the JSS

-fut Remove any files from the package that are in the User Templates

-feu Remove any files from the package that are installed in a user's home directory

So I want to uninstall older versions of office. However, there is no need to do it mass, so I don't want to scope a policy of individual machines. Instead I want to do it via a simple script. What is the JSS ID of a package? I don't see anything where you get the package ID. Anyone?

-Tom

11 replies

golbiga
Forum|alt.badge.img+21
  • Employee
  • 298 replies
  • May 26, 2011

Tom,

In Casper Admin, highlight a package and on the bottom it should say JSS ID.

Allen


Forum|alt.badge.img+31
  • Author
  • Honored Contributor
  • 2721 replies
  • May 26, 2011

OK I figured it out, well my co-worker did. You highlight the package in Casper Admin and below it gives the info. This could be done better so I am going to BC Jamf support and feature request the JSS ID is in the get info window


Forum|alt.badge.img+31
  • Author
  • Honored Contributor
  • 2721 replies
  • May 26, 2011

OK, now I am getting errors, package is indexed

Getting package details from https://xs001-casper.kckps.org:8443//... Uninstalling... terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc /bin/bash: line 1: 3717 Abort trap sudo jamf uninstall -target "/Volumes/Macintosh HD/Applications" -id 99 -feu

I have tried /Volumes/Macintosh HD, and .../Applications as well as the target, but the help file just says target volume. Anyone use this with success? I am running Casper 8.0

Thanks,

Tom


Forum|alt.badge.img+31
  • Author
  • Honored Contributor
  • 2721 replies
  • May 26, 2011

OK, so apparently you have to remove the "-target" switch

sudo jamf uninstall /Macintosh HD/ -id 99 -feu

However, it only deletes the apps, it doesn't get rid of the extra junk that office comes with

-tom


Forum|alt.badge.img+20
  • Valued Contributor
  • 732 replies
  • May 26, 2011

Might be better to package an uninstall script with office that gets rid of it 100%. Can you push the uninstaller package that comes with office by default???

--
Matt Lee
FNG Sr. IT Analyst / Desktop Architecture Team / Apple S.M.E / JAMF Casper Administrator
Fox Networks Group
matthew.lee at fox.com<mailto:matthew.lee at fox.com>

Need Help? Call the Help Desk at (310) 969-HELP (ext 24357) or online at http://itteam<http://itteam/>
Help Desk Hours: Mon-Fri, 6AM-6PM PST


Forum|alt.badge.img+5
  • Contributor
  • 59 replies
  • May 26, 2011

I cobbled together a shell script a bit ago to remove Office '04, based on one from William Smith for Office '11 and a couple other sources. It works well enough if you'd like to see it...
It removes the apps, /Library stuff, fonts, user fonts, etc. Could be adapted for 2008 too.

Jon


Forum|alt.badge.img+31
  • Author
  • Honored Contributor
  • 2721 replies
  • May 26, 2011

Yeah my co-worker just whipped up a script to take care of it, but I am
really more curious why the command did not work until you dropped the
"-target" switch and why did it only remove the app if the whole package
is indexed?

Did we just find a bug? Feel free to post your script though I'd like
to see it.

Thanks,

Tom


Forum|alt.badge.img+8
  • Contributor
  • 131 replies
  • June 22, 2012

@jonscott I would like to see your script please even though this thread hasn't been active in a while.


Giannini
Forum|alt.badge.img+3
  • New Contributor
  • 9 replies
  • March 9, 2020

Could someone help me out please? when i run jamf uninstall /Volumes/Macintosh HD -id 33 -feu all i get is
The message could not be parsed.
The JSS did not return information to uninstall this package. How do i find the ID?


Forum|alt.badge.img+12
  • Valued Contributor
  • 359 replies
  • March 9, 2020

To get the package ID open Jamf Admin, double-click the package or hit CMD-I to get the info. Under the Summary pane you will find the 'Jamf Pro Server ID' for the package. To be able to use the uninstall option you need to index the package.


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • March 9, 2020

You can also get the package ID from the Jamf console in the browser. Go to Settings > Computer Management > Packages. Then click on the package in question to open its detail view. In the browser address bar you should see something like this at the end of the URL : packages.html?id=56&o=r, where id=56 indicates the ID of the package - 56 in this example.


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