Wikipedia
Terrorform
"Terrorform" is the third episode of science fiction sit-com Red Dwarf Series V and the twenty seventh in the series run. It was first broadcast on the British television channel BBC2 on 5 March 1992. It was written by Rob Grant & Doug Naylor, and was directed by Juliet May. The episode's plot has the Red Dwarf crew rescuing Rimmer from a terraformed moon based on his own psyche.