Search code examples
cygwin

Remove Cygwin package files without losing details about what's installed?


Internet research indicates that one can remove the Cygwin package files to save space. Within the Cygwin installation folder, I have a subfolder (say) http%3a%2f%2fcygwin.mirror.constant.com%2f reflecting the mirror site. The file http%3a%2f%2fcygwin.mirror.constant.com%2f/x86_64/setup.ini seems to contain all the information about installed packages. The only other folders/files are in the following two folder trees:

http%3a%2f%2fcygwin.mirror.constant.com%2f/noarch/release/*
http%3a%2f%2fcygwin.mirror.constant.com%2f/x86_64/release/*

Can I remove everything in the http%3a%2f%2fcygwin.mirror.constant.com%2f folder tree except http%3a%2f%2fcygwin.mirror.constant.com%2f/x86_64/setup.ini and still have the installer know what I have installed, what needs updating, and what needs downloading for a re-install?


Solution

  • The information about installed package is stored in

    /etc/setup/installed.db
    

    the cache in http%3a%2f%2fcygwin.mirror.constant.com%2f is only needed during installation or re-installation of any package.

    See info in the Cygwin User Guide
    https://cygwin.com/cygwin-ug-net/setup-net.html#setup-localdir

    After installing Cygwin, the cache is no longer necessary, but you may want to retain the packages as backups, for installing Cygwin to another system, or in case you need to reinstall a package.