If your are getting “bash: clear: command not found” on you first install of cygwin you have to make sure that you include ncurses packages in your cygwin installation. clear.exe doesn´t come in the standard installation. You must include ncurses to get clear.exe in your system. If you are using bash you can use Ctrl-L and get the same result though.
UPDATE: ncurses is a cygwin package in libs category in Utils category. You can install it using the the Cygwin Setup utility (just run setup.exe again). See screenshot below







































35 Comments
Thanks Ruben. You saved me a heck of a long search for clear.exe. Is this new (clear not being in the “base”)? I’ve probably installed cygwin a donen times in the past few years and haven’t had this problem until now.
‘m not sure but I also think this behaviour is new. I was also surprised the first time I saw this. I reinstalled cygwin several times until I realized that there was nothing wrong with my installation and that ncurses was the package that I was missing.
Thanks. Found your post from google, help me
“fix” my cygwin installation.
Thanks. Thought I was going crazy not having the clear after a new cygwin install.
Hmm… What is ncurses and where do I get it? Further, how do I type Ctrl-L in bash. I keep getting an error.
Thanks…
Thanks so much. This is definitely something new with cygwin installation. I’ve always took clear for granted until I realized it isn’t included by default anymore. I had to copy clear.exe from an old installation just to get it to work, and I always thought I’ve corrupted the installation somehow.
erik: ncurses contains libraries for terminal handling and you get it by running cygwin’s setup.exe again and add it to your installation. You should be able to type Ctrl-L (hold down control key + press L) in your cygwin terminal window.
Thanks so much.
Fantastic! Thanks for the info.
Btw, if you’re looking at the packages in category view (the default view in the setup program), ncurses is in the “Libs” section.
thank you..
I remember that when I installed cygwin in the past, there was a ‘clear.exe’ in the bin directory.
Anyway, the ncurses package solved the problem.
Thanks a lot Ruben!
Thanks a lot. You spared me a drunken rage or two :)
thanks!
Thanks.
This post was the first post I found on this issue, and then I spent a few more seconds googling for which categroy I could find the ncurses package in.
It was in the libs category, but for ease, i’d appreciate if you could update the original post.
Thanks!
Thanks! Saved me a lot of frustration and time..
Thanks a lot ….
thanks a lot.
this did it, thanks a bundle
Definitely helped a lot… Thanks a bunch..
Thanks a lot…was finding it really tough to figure out why it ain’t workin!
Tput.exe is part of curses library too.
FYI – It looks like the ncurses package has been moved to the “Utils” section of the cygwin installer. At least that’s where I found it this morning.
Thank you SO MUCH for posting this – it saved me tons of frustration.
Ruben,
I was getting crazy with this problem. Your post is great!
Thanks a lot
Installed and uninstalled then reinstalled still doesnt work. not even “Ctrl+L” on the reinstall i installed the whole thing.
thanks dude, this error occurs when trying using cake’s bake console, thanks
Thanks so much for sharing the information.
I haven’t used Cygwin or Linux for a while. When I found “clear” command was refused by bash, I thought I remembered the command wrong. Had to google first to make sure there’s indeed such a command then google again to find out it’s missing in the cygwin default package. I wonder why it’s not included in the default package. Same with “script” command.
Many thanks for your answer. I love google.
Guys, Thanks a lot !
I was trying hard to write scripts and other work around to solve this issue. Thanks for sharing this info. Internet always “HELP”
just starting to setup ssh server for cygwin.after login,i can’t run clear command, until i found this link. this is what i call, the power of internet.thanx :D
It was of great help, really!
Thanks!
Thank You! You saved my time. Don’t understand why people want to mess-up something that is working for very long time.
Ctl-L instead of clear by default, can’t understand the logic.
Thank you! I was hoping there would be a fix for ‘clear’ not working in Cygwin. This was it!
Thanks for the info :) keep up the good work!
One Trackback
[...] is part of the ncurses package that may be found in the Libs category. Thanks to Ruben Laguna for his post on the [...]