In Rogue One we see
the Death Star fire in "single reactor" mode at the Scarif to destroy the Imperial archives.
The main question is
why not just blow it all up? You'd also take out the Rebel fleet, most likely.
I can think of a few reasons:
You will recall that the Death Star wasn't fully operational until partway through Episode 4.
Princess Leia Organa: Governor Tarkin, I should have expected to find you holding Vader's leash. I recognized your foul stench when I was brought on board.
Governor Tarkin: Charming to the last. You don't know how hard I found it, signing the order to terminate your life.
Princess Leia Organa: I'm surprised that you had the courage to take the responsibility yourself.
Governor Tarkin: Princess Leia, before your execution, I'd like you to join me for a ceremony that will make this battle station operational. No star system will dare oppose the Emperor now.
Princess Leia Organa: The more you tighten your grip, Tarkin, the more star systems will slip through your fingers.
Governor Tarkin: Not after we demonstrate the capabilities of this station. ...
General Tagge: Until this battle station is fully operational, we are vulnerable. The Rebel Alliance is too well equipped, they're more dangerous than you realize.
Admiral Motti: Dangerous to your starfleet, Commander; not to this battle station.
However, as Werrf mentioned, the likelihood of destroying oneself when hovering a few thousand miles away from a planet you intend to utterly destroy in an explosion ten times its size... is fairly high.
If you recall, there was a fair amount of hand-wringing over its initial use; they had to come up with a cover story for the
destroyed Holy city on Jedha,
because they weren't ready for the rest of the empire to know about it yet.
You would also likely take out the Death Star, and the Devastator. You don't drop a strategic nuke in the middle of your own fleet if you can avoid it.