How can I partially clear my terminal scrollback?
37,309
Not sure about partially, but you can fully clear your scrollback with Cmd+K. Control+L will only clear the screen, not the scrollback content/history/buffer.
If you want the partial scrollback badly enough, this would probably be the place to implement it.
Related videos on Youtube
Author by
Javid Jamae
Updated on September 18, 2022Comments
-
Javid Jamae almost 2 years
I want to partially clear my terminal scrollback history, but only from where I have selected with my mouse in the scrollback and up. Is this possible? I'm on a Mac, and I use iTerm2 and Terminal.
-
Javid Jamae over 10 yearsNo, I think you misunderstood. The .bash_history file is for the command history, not the terminal scrollback history.
-
Javid Jamae over 10 yearsThanks, but man, that is some nasty code! I don't think I'd ever want anything so badly that I would have to get in to that codebase. :-)
-
bertieb about 6 yearsWelcome to Super User! Please reread the question- OP is asking about scrollback, not history.
-
Seamus about 2 yearsIf this is still true - and it seems it is - that's very disappointing. The scrollback buffer looks like a trash dump, picking up bits from the pager & randomly over-writing stuff that might actually be useful.