Hey that's nice, thanks.

Dave Korn wrote:
  Yep.  It's in /etc/setup/installed.db.  Here's a shell script to generate a
dos batch file to remove all your cygwin files.

#!/bin/bash
cut -f1 -d' ' < /etc/setup/installed.db | grep -v INSTALLED.DB \
| xargs cygcheck -l | xargs cygpath -w  | sed -e 's/^/del /g' \
remove-all-cyg-files.bat


  This doesn't take care of the left-over directories.  Running the list
through dirname sort uniq xargs cygpath and sed 's/^/rd /g'
another-batch-file.bat is left as an exercise for the reader.

I noticed a couple of small potential gotchas: the generated batch file has some of the filenames repeated. Also, in my installation there is one file name with spaces:

e:\cygwin\usr\share\lcms\profiles\sRGB Color Space Profile.icm

so here is a version modified slightly to remove duplicate filenames and to handle filenames with spaces.

    #!/bin/bash
    cut -f1 -d' ' < /etc/setup/installed.db | grep -v INSTALLED.DB | \
    xargs --delim='\n' cygcheck -l | xargs --delim='\n' cygpath -w  | \
    sed -e 's/\(.*\)/del "\1"/g' | sort -u > remove-all-cyg-files.bat

Regards,
  Vin Shelton


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to