To clear the Terminal screen on Mac you can make use of the "clear" command,Syntax:
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 on the top of the window.
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).
- How to load zsh profile on opening shell terminal
- Set Python 3.8 as a default python version on macOS
- Show CPU and Memory Usage on macOS Menu Bar
- How to save macOS Terminal outputs as text file
- How to install wget on macOS
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- How to Change Mouse Wheel Scroll Direction on Mac
- macOS R installation steps
- How to open terminal on Mac to run commands
- How to know your Mac Screen Resolution?
- Safari - Get HTTP Request Response Headers
- Opening mac Terminal
- bash: command not found error [macOS Terminal Linux, Unix or Windows]
- Add Bookmark macOS Safari
- How to check RAM details on Mac?
- How to install Java on macOS [Big Sur]
- How to Display Analog Clock on Mac Menu Bar
- How to remove app from Dock when closed [macOS Big Sur]
- How to add to PATH in macOS Big Sur
- Keyboard Shortcut to delete a file on a Mac [Macbook]
- How to increase macOS Terminal text font size (Big Sur)
- Permanently set $PATH variable in Mac Zsh shell
- Delete a Directory using Mac Terminal Command
- Remove Now Playing icon from macOS Big Sur Menu Bar
- How to find files taking up space on your Mac
- How to send SMS on Android Emulator - Android
- Android : java.lang.IllegalArgumentException File contains a path separator - Android
- incorrect line ending: found carriage return (\r) without corresponding newline (\n) - Android
- Find Covid-19 Vaccine centers on macOS or iOS Maps App - News
- Download interrupted: Unknown Host dl-ssl.google.com Error Android SDK Manager - Android