uninstalling a package from the command line

tlarkin
Honored Contributor

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 11

golbiga
Contributor III
Contributor III

Tom,

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

Allen

tlarkin
Honored Contributor

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

tlarkin
Honored Contributor

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

tlarkin
Honored Contributor

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

Matt
Valued Contributor

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

jonscott
New Contributor

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

tlarkin
Honored Contributor

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

Snickasaurus
Contributor

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

Giannini
New Contributor II

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?

mschroder
Valued Contributor

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
Legendary Contributor III

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.