A Self-Destruct or Auto-Destruct sequence is a program that destroys a spaceship or facility without external aid, generally to prevent sensitive military data falling into enemy hands.
The Auto-destruct aboard Red Dwarf could only be activated or deactivated by the Captain or one of the senior officers. It had a fifteen minute countdown before a large bomb was detonated to destroy the ship.
When a skutter went berserk on the maintenance decks of Red Dwarf, rewiring all the equipment at random, Rimmer warned Lister not to touch anything electrical. Lister ignored (or at the very least failed to heed) that advice and ordered a milkshake and a crispy bar from a vending machine. That machine had been wired to the auto-destruct sequence and warned the crew that they had fifteen minutes before the bomb detonated. When Lister tried to override the sequence by pressing the "Cancel" button on the vending machine, all it did was knock one minute off the countdown. He continued to press it until the countdown had reached less than 9 minutes.
The Auto-destruct sequence computer read the voiceprint and brainscan of anyone attempting to access it, preventing the Dwarfers from cancelling the program. Kryten suggested swapping Lister's mind with a hologram disc. Carol Brown, the ship's Executive Officer, was placed in Lister's body and attempted to override the sequence. The computer rejected her request and completed the program, at which point Lister's snack arrived. Holly explained that she had disposed of the bomb "ages ago", but that no-one had asked. (RD: Bodyswap)
The engines of Red Dwarf are later overloaded, caused by a massive power surge created by the Triplicator. Holly warns them they have minutes to vacate since the destruct sequence has been initiated. Although the ship does indeed explode, the crew get away safely on a Starbug. Red Dwarf is reformed by the absorption of the "High" and "Low" versions of the ship. (RD: Demons & Angels)
Red Dwarf apparently had no self-destruct sequence when rebuilt by the nanobots in Series VIII. As the ship was being eaten from the inside out by the Chameleonic Microbe, the majority of the crew evacuated without blowing up the mothership. (RD: Only the Good...)
When a polymorph was killed aboard Blue Midget, Lister did not trust that the GELF would stay dead. He insisted on shooting Blue Midget back into space and detonating the craft using the self-destruct sequence. Blue Midget was indeed destroyed this way, but a baby polymorph escaped back to Red Dwarf. (Better Than Life)
Behind the scenes
The voice of the Autoserve machine was provided by the show's production manager, Mike Agnew.