How to install Cygwin packages from commandline using apt-cyg

Probably the biggest pain in using Cygwin is that you need to use the setup program and go through its wizard dialog to view, install or uninstall packages. Thankfully, there is now a solution called apt-cyg.


To install apt-cyg, first install the subversion and wget packages using the setup program. After that do:

$ svn --force export /bin/
$ chmod +x /bin/apt-cyg

You are now ready to use apt-cyg, which is actually a Bash shell script.


Right now apt-cyg does not work, since Cygwin has been split into two architectures: x86 and x86_64. To make apt-cyg work with this split architecture, look at the two commits submitted in this pull request to the apt-cyg Github repository. As of this writing, these commits have not been pulled into the mainline. Just make these two small changes to your apt-cyg and you are good to go.


This is really easy:

$ apt-cyg update
(Update package information from the internet)

$ apt-cyg show
(Lists installed packages)

$ apt-cyg find foo
(Lists installed and not-installed packages with foo in their name)

$ apt-cyg describe foo
(List description of package named foo)

$ apt-cyg install foo
(Install package named foo)

$ apt-cyg remove foo
(Remove package named foo)

Tried with: Cygwin x86 6.1

2 thoughts on “How to install Cygwin packages from commandline using apt-cyg”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s