16

In cygwin, how do I:

  • List all installed packages
  • List files belonging to a package
  • Tell which package a file belongs to
  • Install a new package
  • Uninstall a package
  • Get info about an installed package (deps, version, etc)

6 Answers6

23

List all installed packages

cygcheck --check-setup --dump-only
  • without --dump-only the command will take few minutes to complete because it will TEST all packages. You should see an OK for each package if everything is fine ;)

List files belonging to a package

For package bash do:

cygcheck --list-package bash
  • it works for installed packages only

Tell which package a file belongs to:

For file /usr/bin/bash.exe

cygcheck --find-package /usr/bin/bash.exe
  • it works for installed packages only

Install a new package

Considering you already run setup GUI and have valid mirror(s), local package directory and other options set, you could run to install abook:

/path/to/setup-1.7.exe --quiet-mode --download --local-install --packages abook
  • it will also automatically update all your installed packages to the latest version available
  • you could also select the mirror and other options in command line, see /path/to/setup-1.7.exe --help
  • I know the new version of cygwin 1.7 (beta version, but pretty stable) which currently uses setup 2.649 supports these options, but I didn't tested on 1.6

Uninstall a package

As far as I know, only the GUI supports this option.

Get info about an installed package (deps, version, etc)

The version is listed together to each package on the listing (first item). Deps are really tricky to find: when setup runs, it creates on the local package directory one entry for each mirror. There you can find the list of all packages available on that mirror (setup.ini for version 1.6 and setup-2.ini for version 1.7) with the package name preceded by a @ and deps preceded by requires:. If, for any reason, the mirror you are using is outdated, setup displays a warning message when downloading info.
dcharles
  • 149
  • 9
user25713
  • 339
  • 1
  • 2
3

I have found apt-cyg useful for command line installation of packages without updating all my other packages but it does not everything you need to do.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
Kevin Cross
  • 341
  • 2
  • 3
3

Run setup.exe. It will give you a GUI with checkboxes for various packages.

kmarsh
  • 3,103
  • 15
  • 22
  • 5
    IMO this is cygwins main failing. We need a real package manager! – Joseph Kern Nov 10 '09 at 23:45
  • 1
    I saw some posts on the maillist. Someone is working on an apt equivalent for cygwin. It may show up as part of 1.7 – Zoredache Nov 11 '09 at 00:27
  • @Joseph: that sounds really cool. Thanks for letting us know. – Born To Ride Nov 11 '09 at 12:48
  • Real package manager isn't possible, since it's not possible to overwrite files in use on Windows. You have to close Cygwin before doing upgrade and then you can use external package manager (Cygwin's setup.exe). The most complete package manager is **apt-cyg**, I don't think, there will be anything better. – David Ferenczy Rogožan Apr 17 '14 at 20:50
2

Here is the best fork right now for apt-cyg. https://github.com/kou1okada/apt-cyg

jonretting
  • 204
  • 1
  • 3
0

Allow me to introduce you to the Cygwin FAQ

  • List installed
  • How do I uninstall individual packages
  • How do I uninstall individual packages
  • Get info about an installed package

Run Cygwin Setup

  • List files belonging to a package
  • Tell which package a file belongs to

Search at http://cygwin.com/packages/

Zoredache
  • 128,755
  • 40
  • 271
  • 413
0

It is now possible to uninstall packages as well:

/path/to/setup.exe -x yourpackagename
breizhmg
  • 101
  • 1