So, I would like to know if there's a command in Minecraft PE that removes all blocks except certain blocks: / fill x y z x y z air… If so how?
It will be difficult. You can, however, remove certain blocks and simply do it multiple times.
/ fill x1 y1 z1 x2 y2 z2 air 0 replace [block to be overwritten] [block state; usually 0] {nbt tags; can usually To be omitted}
What if I want to overwrite more than 1 block?
Execute several times in a row.