replace by

replace someone or something by someone or something

 and replace someone or something with someone or something
to remove someone or something and add someone or something in place of the first. The manager replaced two workers by a machine. Walter replaced his old lawn mower with a newer one.