Question:

When the bible says god will destroy the earth dose it mean just the earth or the whole universe because in a few years Elon musk says we will be on, Mars so destroying the earth would be pointless so basically will god only destroy earth or the whole universe?

Answer:

Isaiah 65:17   “For behold, I create new heavens and a new earth; and the former shall not be remembered or come to mind.”

2 Peter 3     10 But the day of the Lord will come as a thief in the night, in which the heavens will pass away with a great noise, and the elements will melt with fervent heat; both the earth and the works that are in it will be burned up11 Therefore, since all these things will be dissolved, what manner of persons ought you to be in holy conduct and godliness, 12 looking for and hastening the coming of the day of God, because of which the heavens will be dissolved, being on fire, and the elements will melt with fervent heat? 13 Nevertheless we, according to His promise, look for new heavens and a new earth in which righteousness dwells.

Revelation 21:1   Now I saw a new heaven and a new earth, for the first heaven and the first earth had passed away

I don’t think that God is just going to destroy everything that He created, to get rid of sin. Sin first started in heaven, right next to God, and then moved to earth, where we can see the results very clearly. It seems as if God wants to wipe out every place where sin has reached, and He may therefore decide to cleanse the moon, Mars and every other planet where sin has touched, as well as all the space junk that is out there. But that is just my opinion, the Bible does not really say anything more than the passages above. 

I hope that this makes sense. God bless!