How to qdel all jobs

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 4, 2026

Quick Answer: To "qdel" all jobs in a Sun Grid Engine (SGE) or Oracle Grid Engine (OGE) environment, you can use the command `qdel -u '*'`. This command targets all jobs submitted by all users on the grid. Be cautious when using this command as it will terminate all running and pending jobs without further confirmation.

Key Facts

What is qdel?

The `qdel` command is a fundamental utility used in distributed computing environments, particularly those employing Sun Grid Engine (SGE) or its successor, Oracle Grid Engine (OGE). Its primary function is to delete or cancel jobs that have been submitted to the grid's job scheduler. This is crucial for managing computational resources, freeing up slots for new jobs, or correcting errors in job submissions.

Understanding Job Management in SGE/OGE

SGE/OGE is a workload management system designed to distribute computational tasks across a cluster of computers. Users submit jobs to the scheduler, which then queues them and allocates them to available computing resources (nodes). Each job is assigned a unique Job ID. The `qstat` command is used to view the status of these jobs (running, pending, finished), while `qdel` is used to remove them from the queue.

How to qdel Specific Jobs

Before attempting to delete all jobs, it's important to understand how to delete individual jobs. If you know the Job ID of a specific job you wish to cancel, you can use the `qdel` command followed by the Job ID:

qdel 

For example, to delete a job with ID 12345, you would type:

qdel 12345

If you have multiple jobs with the same base ID (e.g., array jobs), you might need to specify the task ID as well, often in the format `job_id.task_id`.

Deleting All Your Own Jobs

If you wish to delete all the jobs that you have submitted yourself, you can use the `-u` flag with your username:

qdel -u 

Replace `` with your actual login name. This is a safer approach if you only want to clean up your own submitted tasks without affecting others.

Deleting All Jobs on the Grid (`qdel -u '*'`)

The command to delete all jobs submitted by all users on the grid is:

qdel -u '*'

Explanation:

Important Considerations and Warnings:

Using `qdel -u '*'` is a powerful and potentially disruptive command. It should be used with extreme caution and only when absolutely necessary. Here's why:

When Might This Command Be Used?

While generally discouraged for regular users, `qdel -u '*'` might be employed by system administrators in specific situations:

Best Practices:

If you are not a system administrator, avoid using `qdel -u '*'`. If you need to manage your own jobs, use `qdel -u `. If you believe a global job deletion is necessary, consult with your system administrator first. They can assess the situation and perform the action if required, often with more granular control or confirmation steps.

Sources

  1. Sun Grid Engine User's Guide - qdel commandfair-use
  2. SGE (Sun Grid Engine) - The University of Manchesterfair-use
  3. Oracle Solaris Cluster Data Services Guide for Oracle Solaris OS - qdelfair-use

Missing an answer?

Suggest a question and we'll generate an answer for it.