How can I use cygwin without wasting HD space? [closed]

I love using Cygwin, but I hate all of the extra disk space it seems to use caching stuff I don't need. What can I delete to keep my installation footprint as small as possible?

On a related note, what is a good barebones set of packages that will give me the essentials, without fluff that I'll probably never run?


Some people appear to be under the assumption that it is easy to swap out the hardware on whatever platform this person is using. It may very well be that 500MB is actually a large amount of space to sacrifice if they are perhaps using a CF adapter and a 4GB card to run windows on a netbook or similar. Or they may be installing it to a virtual image and this extra information means the difference between it fitting on a DVD unzipped or having to span multiple DVDS and dealing with the issues that come with that, especially if it is being sent to a client that isn't particularly technical for example; In-house training material for the application your company develops. Having one defined image that is the same for all trainees works wonders, makes the environments homogenous and makes the trainer's life easier. Virtual images are a simple way to do this in most situations.

Solve the problem that the user asked about or ask them a question to get more information.

POTENTIAL SOLUTION:

When installing Cygwin, on the screen where it asks you where to store your packages, point it at a specific location, say c:\Cygwin\Packages. Install as normal, run it to check that it operates correctly. Delete the folder the packages are stored in, if required for updates Cygwin will download it again, not the most effective use of bandwidth but depending on your requirements it may be better than keeping the cache locally.

Another option is to install these packages, but the first time you do it, save the packages to another location like a USB drive, then if you have to do


I note that that my current install is under 250MB, It would have to be four times that size before I started to care about it on my laptop.

But, if you have needs to get it smaller...

Download the installer. Save it to to c:\cygwin\setup.exe. Run the installer. Unselecting as many of the packages as you can. Noting, that if you select a package that has requirements, it will auto-select the needed packages. Remove the installer cache (which should have defaulted to c:\cygwin(http|ftp)somethingoranother. Rerun the installer from c:\setup.exe attempting to uninstall more packages. Repeat until the installer is as small as you wish.

Note, there will be a bunch of basic library packages that will be required in even the most minimal install. I have in the past (about a year ago), gotten it down to under 100 megs while still having everything I ever threw at it in terms of bash scripting.


I can't use Windows without installing Cygwin, but I've never really had too much of a problem with it using disk space though. I think you can delete the folder Cygwin stores the packages in but every time you update Cygwin it will download the packages it needs.

As for a barebones setup, it really depends on what you need. I start with the base Cygwin install and add OpenSSH, Cron, RXVT, Screen, Vim, Git, Curl, Zip/Unzip, and Wget. Those are most all the tools I need, but I just install something else if the need arises.


Instead of Cygwin, you could also go with more packages that are not intending to solve all the problems Cygwin aims to be able to solve. There are packages of unix utilities with just the a limited selection of the most commonly used programs.

Unix Utilties for Windows is the one I used back in the day, but it appears to be a dead project.

GnuWin32 appears to still be alive.


I would start with the basic cygwin package, and 'page-fault' in any additional commands you need. I keep a list of common utilities which I use, but might be quite different from what you use. Do NOT select ALL packages when you install Cygwin. I did this once and it took about 6GB. My thinking was then I'd never have to worry about not having a program. It was a bad idea.

My Windows XP machine has 1.1 GB in service pack uninstall data. I'd delete those files well before trying to trim down Cygwin. Try using the WinDirStat program and see where all your hard drive space is going - it's probably not Cygwin. Also, from time to time, you should probably delete C:\cygwin\tmp, as this doesn't get cleared on reboot.