How to clear Rails irb console history

Rails irb is the console system which used by all Rails developers for testing purpose and debugging purpose.

Every commands and actions are stored in the history.

Usually the irb history path will be ~/.irb-history

How to clear the irb history

To clear the Rails console history, enough if we can clear the history file path.

Run the following command from terminal to clear the Rails irb/ Rails console history.

cat /dev/null > ~/.irb-history
Clear Rails irb history

That’s it now your Rails console history will be erased completed.

Updated: March 11, 2024 — 2:44 pm

3 Comments

Add a Comment
  1. Everything is very open with a really clear description of the challenges. Aurlie Kristofor Reinertson

  2. Only wanna input that you have a very decent web site , I the design and style it actually stands out. Leshia Anthony Cicily

  3. I have been exploring for a little for any high quality articles or weblog posts on this sort of house . Lila Quentin Rozek

Leave a Reply