How to go back to prelude> in ghci

Try using the :m command. It should unload all the modules.

This is short for :module which sets the current context. You can also load arbitrary modules this way:

Prelude> :m Data.List Control.Applicative
Prelude Data.List Control.Applicative> :m
Prelude>

Adding to the answer by @Tikhon Jelvis.

Apparently you can choose to unload modules using the syntax :m -<module>. As in:

Prelude> import Numeric
Prelude Numeric> :m -Numeric
Prelude> :m +Numeric
Prelude Numeric>

Source: [Haskell] Import/unimport a module into ghci