Minecraft – How to remove a block itself near another specific block

minecraft-bedrock-editionminecraft-commands

I want to know how to do this in Minecraft Bedrock Edition. For example: A player placed a chest near piston, is there any way to remove the chest itself near the piston?

Best Answer

/fill x1 y1 z1 x2 y2 z2 air 0 replace chest

Replace the x1-z2 arguments with actual coordinates that describe the diagonal of the volume you're checking.