Delete large number of jobs with SGE

Sometimes I accidentally add lots of jobs to our SGE queue and want a quick way to delete them.

Googling for a solution to this returns a whole host of different answers (e.g. this stackoverflow answer – which doesn’t work for me). However the easiest way I’ve found of quickly getting rid of a load of jobs in the queue is to use ‘qdel’ with a ‘seq’ command. Say you want to get rid of jobs with the IDs 1612 through 1750, then all you need to do is:

qdel `seq 1612 1750`

And all the jobs will be marked for delete. If you want to mark all the jobs for a given user for delete you can just do:

qdel -u "username"
This entry was posted in Linux and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.