Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

8 Answers 8

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.

share|improve this answer

First of all "it seems to use caching stuff I don't need"... what the heck are you talking about?

Complains about cygwin's size are unjustified myths. The base cygwin installation is very minimal and there is no point to trying to make it smaller for yourself. Cygwin has very small memory footprint. Compared to the 20 gb size of vista, my cygwin is 500 mb, 2.5% the size to emulate a completely different operating system and about 5 cents of hard drive space.

share|improve this answer
    
Where are you buying your hard drives? 1TB can be had for about $100 these days, 10 cents per Gigabyte; half a gig is 5 cents. Here's a nickel kid, buy yourself a real O/S shell. –  Mark Ransom Jun 8 '09 at 4:56
    
It was just off the top of my head. Fixed now. –  Ian Kelling Jun 8 '09 at 6:34
6  
How is this the top rated answer? It doesn't answer the question, it merely dismisses the relevance of the question! -1 Lots of situations where a few gig make a difference (like the 1.7G cygwin folder on my 160GB SSD!) –  imoatama Feb 19 '12 at 20:18

As a cygwin user i agree with both the prior posts.

NEEDS: grep, sed, awk, cut, diff, comm, vim, OpenSSH, tar, gzip, bash, wget

As for space, I agree with Ian. Small price to pay for space. You can now get a 1TB 10,000 RPM drive for under $100.00. I can remember when we all had to pay over $150.00 for a 20.00 GB drive.

If you are really concerned about local drive space, try to get your self a NAS storage box to sit on your network, and store the "downloaded packages" to it. That will further reduce the footprint on your own machine.

It's really a small price to pay for Cygwin.

share|improve this answer
    
There are no 10k rpm 1TB drives on the market. The 1TB drives are 5400pm or 7200rpm. –  Brian De Smet Jun 8 '09 at 23:42
    
correct, i was looking at a WDC drive, Western Digital WDH1Q10000N, and made incorrect assumption. –  netlinxman Jun 9 '09 at 0:00

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

share|improve this answer
    
I wonder if there's a way to regularly delete the tmp folder? –  CMCDragonkai May 14 at 8:20

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
    
I've already deleted the leftover SP MSIs, and I use WinDirStat often to trim cruft. Thanks for the suggestions :) –  Chris Marasti-Georg Jul 13 '09 at 17:08

You could switch from CygWin to Gow, a lightweight alternative to CygWin (about 10 times lighter)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.