Command to replace all blocks of one type with another [duplicate]

Use the /fill command.

Note the coordinates of one of the corners of your building and the one diagonally opposed: enter image description here

Then use them in your command:

/fill x y z x2 y2 z2 <block> <block variant> replace <block> <block variant>

  • x y z are the coords of the first corner
  • x2 y2 z2 are the coords of the other corner
  • the first block takes the block you want to have (use air to simply remove blocks)
  • the second block is the one you want to be replaced with the first one
  • replace is the magic part telling minecraft to replace blocks

So in your case this should do:

/fill x y z x2 y2 z2 planks 5 replace purpur_block
/fill x y z x2 y2 z2 log2 1 replace purpur_pillar