Delete active tasks in ProfileManager

Can I delete active tasks in the profilemanager? There are over 500 of them, and it stopped pushing to the devices.

Is there a command line for batch deleting?

Posted on Jan 24, 2012 8:49 AM

Reply
9 replies

Dec 17, 2013 6:24 AM in response to michaelhoch

1. Launch the Terminal on the PM Server. You’ll find it in the Utilities folder under Applications.

2. Copy and paste in the following command. This command accesses the database that Profile Manager stores all of its data in and erases all of the tasks.

sudo psql -h "/Library/Server/PostgreSQL For Server Services/Socket" -U _postgres -d device_management -c "TRUNCATE TABLE tasks;"

3. You will be asked for your password. Type it in and press enter.

Jan 20, 2014 6:27 AM in response to Tearjerker

When i use your command:

sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NOT NULL"


It says:

psql: could not connect to server: No such file or directory

Is the server running locally and accepting

connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket/.s.PGSQL.5432"?


When i use this command:

sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NOT NULL"


It says:

DELETE 0


Now when i go to Profile Manager there are still 200 active tasks running...

What i do wrong ?

Jan 20, 2014 9:59 AM in response to Tearjerker

Hi Tearjerker,


Thank you for your fast reply.


When i use your command it gives the following message:


psql: could not connect to server: No such file or directory

Is the server running locally and accepting

connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket/.s.PGSQL.5432"?


( sorry, i copy paste it wrong in my first message, i have try this command before ).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Delete active tasks in ProfileManager

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.