I would never recommend someone to re-use a tank for an octopus that has housed non-aquatic animals. But if you are planning to do so, first make sure the tank is rated for aquaria. Most tanks designed for reptiles use thinner glass and may not be sealed properly to prevent leaks. Secondly, the best way to clean the tank would be to use bleach and then neutralize with sodium thiosulfate. That should sterlize the glass, but you still have to worry about the silicone sealant. Silicone can absorb and hang on to nasty chemicals for long periods of time, so if you are set on reusing the tank, I would recommend removing the silicone and re-sealing the tank yourself before you put an octopus in it.
Again, I wouldn't recommend doing this and would never do it for my own animals. The safest bet would be to have separate tanks for aquatic and non-aquatic animals. If you are going to reuse the tank anyway, bleaching and thio-ing the tank, and then replacing the silicone would be, in my opinion, the safest way to do it.