Removing Apps Available for use in Profile Manager

I’ve previously written about Apple’s Profile Manger not wanting to remove deleted or changed printers.  A long standing bug.

Well, whatever summer intern Apple hired that must have been responsible for the printer debacle, had his/her hands in what programs are available in Profile Manger for the Dock on clients as well. Once you add an App, or change it’s path, the original is stuck in Profile Manager’s database forever. Our steps to cure this are very similar to how we fix this issue with printers.

This workaround assumes you’re using at least OS X 10.9.4 and Server 3.1.2. I’ve not tested it with earlier versions of either software. You’re going to remove Apps directly from Profile Manager’s PostgreSQL database. As always, backups are your friend when you start doing things like this!

Firstly, delete the Apps you no longer want via the Finder on the server itself.

To get into the database via the Terminal:

bash$ sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL

Once in list your printers with:

devicemgr_v2m0=# select * from system_applications;

Delete the one(s) you don’t want with:

devicemgr_v2m0=# delete from system_applications where id=[put the ID# of the application you want deleted here];

When done:

devicemgr_v2m0=# /q

Note that the fields for the applications are very large and contain lots of spaces and random characters (that I’m sure make some sense to Apple), so finding your application can take some time as you scroll.

You may now re-add your Application(s) and Profile Manager will correctly pick up the change.

Apple will occasionally change that database name between updates, so be aware of this if you stumble across this blog in the future.

 

This entry was posted in macOS Server, Tech Trinkets and tagged . Bookmark the permalink.

One Response to Removing Apps Available for use in Profile Manager

  1. Sven says:

    “Note that the fields for the applications are very large and contain lots of spaces and random characters (that I’m sure make some sense to Apple)”

    If you output your query to a text file and open that text file (e.g. in BBEdit), you’ll see why Apple put all those spaces and random characters into that table. 😉

    btw, thanks for your write-up!

Leave a Reply

Your email address will not be published. Required fields are marked *