Cancel All Queued Jenkins Jobs

I do not believe cancelling all queued Jenkins jobs is possible via the UI. Fortunately, it is possible if you have access to the Script Console.

Run this in Manage Jenkins > Script Console:


While this script is innocuous, always be careful when using the Script Console. Any script run inside it effectively has administrative permissions over Jenkins!

Update 2018-09-11: Use Jenkins instead of the deprecated Hudson.