Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like to clear all output from a Terminal window (including all historical output) to get it back to a clean state as if you had just opened a new Terminal window, or a new Terminal tab.

I can use the clear command to clear just the current screenful, but then you can still scroll up to see all the historical output. I'm using the Terminal to trace program output and at the end I would just like to do + A to select all the text so I can grab the output from the just last run, without having to scroll up and see where it started. I could also just open a new tab, I was just wondering if this can be done in the same window?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

Have you tried the clear all combination +k?

There is also ++k, which just clear the scroll-back.

share|improve this answer
    
Awesome! Thank you. I'm not sure how I missed that one, I can now see it under the View menu as Clear Scrollback (⌘ + K). However, ⌘ + ⌥ + K doesn't seem to do anything though. –  binarybob Oct 11 '12 at 8:58
    
Yep ;) You are welcome! –  Maverik Oct 11 '12 at 8:59
    
⌘ + ⌥ + K should clear the Scrollback area (region offscreen). –  Scot Oct 11 '12 at 15:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.