DEV Community

Brisbane Web Developer
Brisbane Web Developer

Posted on

How to clear scrollback on screen

Sumarry

I wanted to make my Konsole to let me clear scrollback while I am using screen so I googled how to do that.

Answer

~/.screenrc
======
defscrollback 50000

# Press "Ctrl + a", "/" and then "Enter" to clear scrollback
# - Konsole disables the functionality if it is on subshell (= screen)
bind / eval "clear" "scrollback 0" "scrollback 50000"
Enter fullscreen mode Exit fullscreen mode

References

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay