Check for Packages in Cygwin

I found this nifty command from the Cygwin wiki; it comes in handy when you need to check whether or not you have a certain package and, if so, the version installed. I needed to compile some C code and was wondering why it compiled on my Ubuntu machine but gave me errors on XP. It turns out the version of GCC that comes with Cygwin was outdated. If you need to update GCC also, the article is here. Otherwise, here’s a typical use of the command:

cygcheck -c bash binutils bzip2 gcc-core gcc-java  gzip m4 make unzip zip

Notice that if you do not have a certain package installed, cygcheck will not output information about it. In this case, I do not have gcc-java, zip, and unzip.

Update 1: After a few hours of building and compiling on a single-core processor, the procedure didn’t work unfortunately.

Update 2: To show versions of all installed packages, do not specify any:

cygcheck -c