YAY, install cygwin-packages from the cmdline

11 Feb

Migrating a cygwin-installation to a new machine was a real PITA to me, since I always have to run the installer many many times to have all the tools I forgot in the previous runs. And this terrible way of having to search them by clicking through the whole package-tree…

Since cygwin-1.7 it is possible to install packages from the commandline, without a single mouseclick:

setup.exe -q -P wget,make,patchutils,psmisc,git,git-svn,bc

Now to get a ready-to-use list of installed packages on an existing cygwin-installation, have a look in /etc/setup/installed.db:


tail -n +2 /etc/setup/installed.db | cut -d ‘ ‘ -f 1 | xargs echo | sed ‘s/ /,/g’

which yields the following packages on my current system:

alternatives autossh base-cygwin base-files base-passwd bash bash-completion bc binutils bzip2 cmake cogito colordiff coreutils corkscrew cpio crypt csih cvs cvsps cygrunsrv cygutils cygwin cygwin-doc dash ddrescue diffutils e2fsprogs editrights expat file findutils gawk gettext git git-completion git-gui git-svn gitk grep groff gzip httptunnel ipc-utils less libapr1 libaprutil1 libbz2_1 libcurl4 libdb4.2 libdb4.5 libexpat1 libexpat1-devel libgcc1 libgdbm4 libgmp3 libiconv2 libidn11 libintl2 libintl3 libintl8 liblzma1 libncurses8 libncurses9 libneon27 libopenldap2_3_0 libpcre0 libpopt0 libpq5 libreadline6 libreadline7 libsasl2 libserf0_0 libsqlite3_0 libssh2_1 libssp0 libstdc++6 libwrap0 login make man minires multitail ncftp netcat openssh openssl patch patchutils perl perl-Error ping psmisc rebase rsync run rxvt sed subversion subversion-perl tar tcltk termcap terminfo terminfo0 texinfo tig time tzcode unison2.27 unison2.31 util-linux vim wget which whois xz zip zlib zlib-devel zlib0 zsync _update-info-dir

[UPDATE:]

while the above command works, there is a better alternative to obtain the list of installed packages – including their version: cygcheck

cygcheck -cd

Leave a Reply

Your email address will not be published. Required fields are marked *