To clear the Terminal screen on Mac you can make use of the "clear" command,
Syntax:% clear
Let's see a demo, below in the gif you can see I ran multiple commands and used the command clear to clean the screen. As soon as the command was fired all the text got cleared and the prompt moved to the top of the window.
![Demo - Clearn Terminal Screen Demo - Clearn Terminal Screen](https://code2care.org/howto/clear-mac-terminal-screen/images/Demo - Clearn Terminal Screen.gif)
As you can see after the screen is cleared when I scroll the window up, I can yet see the previous commands, there is a blank space added after the clear command.
You can read more about the clear command by taking a look at the manual,
% man clear
clear(1) clear(1)
NAME
clear - clear the terminal screen
SYNOPSIS
clear
DESCRIPTION
clear clears your screen if this is possible. It looks in the environment for the terminal type and then in the terminfo database to figure out how to clear the screen.
clear ignores any command-line parameters that may be present.
SEE ALSO
tput(1), terminfo(5)
This describes ncurses version 5.7 (patch 20081102).
Clear Terminal Screen using Keyboard Shortcut
There is another quick way to clear the Mac Terminal screen and that is using the keyboard key combinations
Clear the previous command text
Press the Key Combinations Command + L to clear the screen to the previous mark. By pressing these keys multiple times you can clear the screen incrementally.
Clear full screen using Keyboard
Press the Key Combinations Command + K to clear the whole screen just like the clear command.
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- Fix: grunt: command not found (Mac/Windows)
- AppleScript Example with TextEdit
- How to copy Password of Wifi on your Mac
- Install OpenJDK Java (8/11/17) versions using brew on Mac (Intel/M1/M2)
- How to check if a port is in use using terminal [Linux or macOS]
- Cut, Copy and Paste Keyboard Shortcuts on Mac Keyboard
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to Remove Widgets from macOS Sonoma 14 Desktop
- Turn off Auto-Capitalization on macOS Ventura 13
- How to Go To /usr/local/bin on Mac Terminal?
- How to Open TextEdit on Mac
- Mac: How to Open Android Studio from Terminal
- How to change the default location of Mac Screenshot
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- How to install homebrew (brew) on M1 Mac
- Must Know Homebrew Commands for Mac/Linux Users
- Steps to Uninstall Roblox on Mac (macOS)
- How to change the System Settings Sidebar icon size Mac Ventura 13
- How to set Out Of Office (OOO) on Outlook for Mac [Updated 2023]
- Trigger Notification Center Message using Mac Terminal Command
- [fix] macOS Ventura - Python3 xcrun: error: invalid active developer path missing xcrun at CommandLineTools
- How to Install Rust Language on Mac (macOS)
- How to minimize all Windows in Mac
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- How to make TextEdit the default text Editor on Mac
- Java 8 foreach loop code examples - Java
- Bash Command to Do Nothing with Example - Bash
- How to convert a Excel to PDF file in Mac - MacOS
- 30: How to Check if a Directory Exists or Not in Python Program - Python
- [Docker M1/M2 Mac] qemu-x86_64: Could not open /lib64/ld-linux-x86-64.so.2: No such file or directory AWS CLI - Docker
- How to get the SharePoint Tenant Login URL - SharePoint
- How to Configure GitHub with Eclipse IDE in 2023 - Eclipse
- List all Username and User ID using Bash Command - Bash