bash: clear: command not found

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. You can install it using the the Cygwin Setup utility (just run setup.exe again). See screenshot below

Tags: , , , , , , , , , , , ,

18 Responses to “bash: clear: command not found”

  1. Michael says:

    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.

  2. ruben.laguna says:

    ‘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.

  3. Hafiz says:

    Thanks. Found your post from google, help me “fix” my cygwin installation.

  4. Allan says:

    Thanks. Thought I was going crazy not having the clear after a new cygwin install.

  5. [...] is part of the ncurses package that may be found in the Libs category. Thanks to Ruben Laguna for his post on the [...]

  6. erik weibust says:

    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…

  7. Dave says:

    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.

  8. Ismael Goulart says:

    Thanks so much.

  9. Perry Jones says:

    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.

  10. Nycil says:

    thank you..

  11. Ronald Bulbow says:

    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!

  12. Jeff Lyon says:

    Thanks a lot. You spared me a drunken rage or two :)

  13. Chris says:

    thanks!

  14. Ibn says:

    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.

  15. sheetal says:

    Thanks!

  16. kapil says:

    Thanks! Saved me a lot of frustration and time..

  17. Rajkumar says:

    Thanks a lot ….

  18. Rahul says:

    thanks a lot.

Leave a Reply