According to memory and the Star Trek Transcripts site: in "Where No Man Has Gone Before" Kirk gives a similar order.
After Mitchell escapes from the facility on Delta Vega, Dr. Piper revives Kirk.
PIPER: It hit me, too, whatever it was. Kelso is dead, strangled. At least Spock's alive.
KIRK: Doctor Dehner?
PIPER: She went with Mitchell.
KIRK: Don't give him a pill until after I'm gone. It's my fault Mitchell got as far as he did. Did you see their direction?
PIPER: Yes, there was some morning light. They were headed across the valley, to the left of the pointed peaks. There's flatlands beyond.
KIRK: When Mister Spock recovers, you'll both transport up immediately to the Enterprise.
PIPER: But Captain
KIRK: If you have not received a signal from me within twelve hours, you'll proceed at maximum warp to the nearest Earth base with my recommendation that this entire planet be subjected to a lethal concentration of neutron radiation. No protest on this, Mark. That's an order.
Nobody knows how much life is on Delta Vega, which Kirk does call desolate on stardate 1313.1. But the oxygen in the breathable atmosphere would almost certainly be created by plants, lots of plants in more lush regions of the planet.
The effects of this recommendation, if carried out, would have been similar to that of General Order 24.
On Eminiar 7 in "A Taste of Armageddon":
KIRK: I'm not interested in discussing our differences. You don't seem to realise the risk you're taking. We don't make war with computers and herd the casualties into suicide stations. We make the real thing, Councilman. I could destroy this planet.
Later:
ANAN: Open a channel to the Enterprise. You give me no choice, Captain. We are not bandits, but you force us to act as bandits.
SCOTT [OC]: This is the USS Enterprise.
KIRK: Scotty, General Order Twenty Four. Two hours! In two hours!
ANAN: Enterprise, this is Anan Seven, First Councilman of the High Council of Eminiar.
[Bridge]
ANAN [OC]: We hold your Captain, his party, your Ambassador and his party prisoners.
[Council Room]
ANAN: Unless you immediately start transportation of all personnel aboard your ship to the surface, the hostages will be killed. You have thirty minutes. I mean it, Captain.
KIRK: All that it means is that I won't be around for the destruction. You heard me give General Order Twenty Four. That means in two hours the Enterprise will destroy Eminiar Seven.
Later:
[Bridge]
SCOTT: Open a channel, Lieutenant. This is the commander of the USS Enterprise.
[Council Room]
SCOTT [OC]: All cities and installations on Eminiar Seven have been located, identified, and fed into our fire-control system. In one hour and forty five minutes
[Bridge]
SCOTT: The entire inhabited surface of your planet will be destroyed
[Council Room]
SCOTT: You have that long to surrender your hostages.
Later:
KIRK: Kirk to Enterprise. Come in, Scotty.
SCOTT [OC]: Aye, Captain, are you all right?
KIRK: Everything's secure here. Maintain position. If everything goes according to plan, you can beam us up in ten minutes. If you don't hear from us, carry out General Order Twenty Four on schedule.
SCOTT [OC]: Aye, aye, Captain. Is there anything else we can do?
If Kirk tells Scott to carry out General Order 24 on Schedule, that means that Scott is not already carrying it out by bluffing. Therefore General Order 24 should be real. But if General Order 24 is to bluff, what Kirk says could be part of the Bluff and not real orders to Scott. Arrgh.
And later, after Anana and Ambassador Fox leave the room:
KIRK: Kirk to Enterprise. Scotty?
SCOTT [OC]: Scott here, Captain.
KIRK: Cancel implementation of General Order Twenty Four. Alert transporter room. We're ready to beam up.
The dialog of Kirk and Spock proves that "general order 24" exists, although whether it is a Starfleet general order to devastate a planet or a code to fool enemies with a bluff is uncertain.
In "Errand of Mercy" Kirk tells the Organians Starfleet has the right__:
AYELBORNE: To wage war, Captain? To kill millions of innocent people? To destroy life on a planetary scale? Is that what you're defending?
IRK: Well, no one wants war. But there are proper channels. People have a right to handle their own affairs. Eventually, we would have
AYELBORNE: Oh, eventually you will have peace, but only after millions of people have died. It is true that in the future, you and the Klingons will become fast friends. You will work together.
Neither Kirk or Kor denies Ayelborne's claim that millions would die and life would be destroyed in a planetary scale if the Organians didn't step in to stop the war.
In "Bread and Circuses" Proconsul Claudius Marcus on planet 4 of star system 862 has learned a lot about the Federation from Captain Merik of the SS Beagle.
CLAUDIUS: But on the other hand, why even bother to send your men down? From what I understand, your vessel could lay waste to the entire surface of the world. Oh, but there's that Prime Directive in the way again. Can't interfere.
http://www.chakoteya.net/StarTrek/episodes.htm 1
So it seems to be rather common knowledge in the Federation that a starship can devastate the entire surface of a planet in times of war with other space traveling realms or other situations where the Prime Directive doesn't apply.
So did Kirk and Scott think that the situation of Eminiar 7 justified possibly devastating the entire planet, which would mean that General Order 24 was a real Starfleet order to do so under certain justifying circumstances, or was General Order 24 some bluff that Kirk had arranged to use in emergencies?
There are many other discussion of General Order 24.
https://www.trekbbs.com/threads/a-question-about-the-episode-a-taste-of-armageddon.289387/ 2
https://www.trekbbs.com/threads/general-order-24-were-kir-kand-scotty-bluffing.224323/ 3
https://www.trekbbs.com/threads/does-general-order-24-exist-in-tng.240136 4
Is Starfleet Order 24 feasible? 5