Remove all packages of one source

  #!/usr/bin/perl
  #
  # Author: Florian Ragwitz
  # E-Mail: florian@gnoppix.org
  #
  
  die("Packagelist needed") if(!@ARGV);
  
  while(<>) {
  	if(/^Package: (.*)$/) {
  		print $1."n";
  		system("apt-get remove $1");
  	}
  }

As argument is a file with package informations needed (can be found in /var/lib/apt/lists)

Show Comments