This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how do I uninstall a cygwin snapshot?

(Subject phrased as a question for the archives.)

If you just installed a cygwin1-ccyymmdd.dll.bz2 snapshot, stop all cygwin
services and reinstall the cygwin package (or reinstall the cygwin package
and then reboot).

If you installed a cygwin-inst-ccyymmdd.tar.bz2 snapshot, do the same,
but in addition to the cygwin package, you may occasionally need to
reinstall additional packages or delete files that do not have a
package, depending on what all was changed in the snapshot.

This perl script, given a tarball name, will identify which files from
which packages are present in a snapshot.  For correct identification,
you need to have previously installed the relevant packages via setup.

use warnings;
use strict;
my @files = `tar tjf $ARGV[0]`
   or die "error getting file list from $ARGV[0]\n";
@files = map { s!(.*?)\r?\n!/$1!; m!/\z! ? () : $_ } @files;
my %files;
my %pkgs;
while (keys %files) {
   my $file = each %files;
   my $pkg = `cygcheck -f $file`;
   if ($pkg) {
      $pkg =~ s/-[-\d.]+\r?\n//;
      my @pkgfiles = map { s/\r?\n//; $_} `cygcheck -l $pkg`;
      my @found = grep defined, delete @files{@pkgfiles}
         or die "cygcheck inconsistent for $file/$pkg\n";
      push @{$pkgs{$pkg}}, (@found == @pkgfiles) ? "all" : @found;
   } else {
      push @{$pkgs{"no package"}}, delete $files{$file};
for my $pkg (sort keys %pkgs) {
   print "$pkg:\n";
   print "   $_\n" for @{$pkgs{$pkg}};

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]