The clear command in screen only clears the visible screen, not screen's own scrollback buffer. This is expected behavior.
Use screen's built-in clear (recommended):
Press <kbd>Ctrl</kbd> + <kbd>A</kbd>, then <kbd>C</kbd> (capital C).
This clears both the screen and the scrollback buffer in screen.
Alias clear to send a full reset (add to ~/.bashrc or ~/.zshrc):
bashalias clear='printf "\033c"'
This sends a Full Reset (RIS) sequence, which clears scrollback in most terminals, including GNOME Terminal.
Use reset instead:
bashalias clear='reset'
reset performs a full terminal reset, which typically clears scrollback.
After editing your shell config, reload it with:
bashsource ~/.bashrc # or source ~/.zshrc
Vibe can make mistakes. Check answers. Learn more