'How to clear PBS job history

How can I clear all the PBS jobs that have been finished or are having status 'F'. I just want to see job that are in Queue or running currently. This will shorten the output of qstat command.

pbs


Solution 1:[1]

With

$ qselect -x -s F

You can view the ID of all the jobs that have been finished.

With

$ qdel -x <job_id>

You can delete a job history.

Combine them together with xargs.

$ qselect -x -s F | xargs qdel -x

This will delete every job history.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1