How to Remove Blocks in Minecraft with Commands (/fill & /setblock)

Last updated: November 24, 2026

Quick answer: To remove an area of blocks, type /fill x1 y1 z1 x2 y2 z2 air using the coordinates of two opposite corners. To remove a single block, use /setblock x y z air. To remove only one type of block (for example stone), use /fill x1 y1 z1 x2 y2 z2 air replace stone. Cheats (commands) must be enabled.

Minecraft commands let you change the world in ways normal gameplay can’t, and deleting blocks is one of the most useful. Whether you’re clearing land for a build, hollowing out a mountain or removing a mistake, the commands below work in both Java and Bedrock Edition.

Step 1: Enable Commands (Cheats)

Commands are typed in the chat window. Press T to open chat, or / to open it with the slash already typed. Most commands only work when cheats are allowed in your world:

  • Java Edition (new world): When creating the world, set Allow Commands (called “Allow Cheats” in older versions) to ON.
  • Java Edition (existing world): Press Esc, click Open to LAN, turn Allow Commands ON and click Start LAN World. This lasts until you leave the world.
  • Bedrock Edition: Pause, open Settings > Game, scroll to Cheats and turn on Activate Cheats. Note that this disables achievements for that world.
  • Servers and Realms: You need operator permission from the owner.

How to Remove Blocks with the /fill Command

The main command for deleting blocks is /fill. It fills a box-shaped region with a block, and filling with air deletes everything inside.

  1. Find your coordinates. In Java Edition press F3 and read the “Block” line. In Bedrock, turn on Show Coordinates in Settings > Game.
  2. Pick two opposite corners of the area you want to clear (for example, bottom-left-front and top-right-back).
  3. Type the command: /fill x1 y1 z1 x2 y2 z2 air
  4. Press Enter. Every block in that box becomes air.

Example: to clear everything from 0, 5, 0 to 20, 10, 20, type:

/fill 0 5 0 20 10 20 air

Relative coordinates: you can also use ~ to work around your position. For example, /fill ~-1 ~-1 ~-1 ~1 ~1 ~1 air clears a 3×3×3 cube centred on you. Be careful: it includes the block you’re standing on.

Useful /fill modes for removing blocks

Command What it does
/fill ... air Deletes every block in the area (same as replace)
/fill ... air replace stone Deletes only stone and leaves everything else
/fill ... air destroy Breaks the blocks as if mined, so they drop as items
/fill ... stone hollow Builds a stone shell and clears everything inside it to air, which is a quick way to carve out an empty room

The replace filter is the most useful for terraforming. For example, /fill ~-20 ~-5 ~-20 ~20 ~5 ~20 air replace water drains water around you, and replace grass_block strips just the grass layer.

The block limit

A single /fill can change at most 32,768 blocks by default (for example 32×32×32). If your area is bigger, you’ll get a “Too many blocks in the specified area” error. Fixes:

  • Split the area into smaller boxes and run several commands.
  • In Java Edition you can raise the limit with a game rule. In Java 1.21.11 and later it is named minecraft:max_block_modifications (it was commandModificationBlockLimit before that). Large values can cause heavy lag.
  • Make sure the whole area is loaded. Commands can’t change chunks that aren’t loaded, so stay close to the area you’re clearing.

Remove a Single Block with /setblock

To delete just one block, use:

/setblock x y z air

Add destroy at the end (/setblock x y z air destroy) if you want the block to drop as an item instead of vanishing. This is handy for removing unbreakable blocks such as bedrock, end portal frames or barriers.

Related Commands

  • /clear removes items from a player’s inventory, not blocks in the world. Example: /clear @s dirt removes all dirt from your inventory.
  • /kill @e[type=item] removes dropped items lying on the ground after a destroy fill.
  • /clone copies an area, which is useful for backing up a build before you clear around it.

Troubleshooting

  • “Unknown or incomplete command”: Check spelling and spacing, and that cheats are on. Block names must be valid IDs such as air, stone or grass_block.
  • “Too many blocks in the specified area”: Your box is over the block limit. Split it up (see above).
  • “That position is not loaded”: Move closer so the whole area is loaded.
  • Nothing happened: In Bedrock, make sure you typed the coordinates in x y z order and that the area actually contains blocks other than air.
  • The game froze: Very large fills can lag the game. Use smaller sections.

Tips Before You Delete Anything

  • Back up your world first. There is no undo for /fill.
  • Double-check coordinates. One wrong number can wipe out part of a build.
  • Test in a copy or a Creative world if you’re working near something important.

FAQ

How do I delete blocks in Minecraft without cheats?

You can’t use commands without cheats. In Creative mode you can break any block instantly by hand, except blocks such as bedrock that need commands.

Does /fill work on Bedrock Edition?

Yes. The basic syntax /fill x1 y1 z1 x2 y2 z2 air and the replace, destroy, hollow, keep and outline modes all work on Bedrock.

How do I remove only one kind of block?

Add replace and the block name, e.g. /fill x1 y1 z1 x2 y2 z2 air replace dirt.

Can I undo a /fill command?

No. Restore a backup, or use /clone beforehand to save a copy of the area.


Follow us on Twitter & like our Facebook page for more post-updates.


Check out related Minecraft posts

Our guides are researched, fact-checked and updated as games change. How we research and verify our guides.