To clear the SQLite console screen I tried cls
, .cls
, cls;
and .cls;
but no luck. Is there no cls
command in SQLite?
Asked
Active
Viewed 2.2k times
49

user4157124
- 2,809
- 13
- 27
- 42

saeed
- 497
- 1
- 4
- 6
-
2"cls" is a DOS command, not a sqlite command. – user2864740 Feb 06 '14 at 23:37
6 Answers
83
To execute CLS
command in the SQLite3 shell you need to do this: .shell cls
As simple as that, .shell args...
allows you to execute CMD commands in the SQLite3 shell.

ivan0590
- 1,229
- 11
- 18
-
33Note that `.shell cls` is for Windows, use `.shell clear` for Unix and Linux. – Stian OK Aug 05 '15 at 22:35
-
In git bash, it moves the cursor to top of screen but does not clear the console. – mallaudin Oct 19 '16 at 07:44
-
1@mallaudin that is because git bash has the same behavior as a Linux terminal so `clear` doesn't really clear the console. Try using `tput reset` or just `reset` in your git bash to actually clear the console. – Sumit Sep 06 '17 at 20:00
31
There is no clear
command in the SQLite command-line client.
But, if you're on a unix-based system (includes Mac OS X) you can use: Ctrl+L
Update:
While my answer is quick and simple, if you're on a compatible OS, make sure you also check out ivan0590's answer about the .shell
command. Definitely a "good to know" as well.

Timeout
- 7,759
- 26
- 38
-
1Here is a [thread on askubuntu](https://askubuntu.com/questions/434240/ctrll-in-terminal), explaining what `Ctrl+l` does, and why. – Dec 19 '17 at 06:41
5
.shell cls will always work(C'mon, if you are in windows). If you are using Linux/Unix/Mac OS, try using .shell clear

Arjun Praveen
- 119
- 2
- 2