I want to delete all fedora 10 packages. I use this script but nothing happen.
Script: #Start Script #!/usr/bin/perl use Frontier::Client; my $HOST = 'spacewalk2."domain"; my $user = 'spacewalk'; my $pass = 'spacewalk'; my $client = new Frontier::Client(url => "https://$HOST/rpc/api"); my $session = $client->call('auth.login',$user, $pass); my $channels = $client->call('channel.software.listPackagesWithoutChannel', $session); foreach my $channel (@$channels) { print "Deleting orphaned package: ".$channel->{'name'}."\n"; $client->call('packages.removePackage', $session, $channel->{'id'} ); } $client->call('auth.logout', $session); #End Script Must I delete the packages at first from /var/satellite/redhat/1/ ? or delete this script also the packages from there and from Spacewalk UI? If I delete from Spacewalk UI, this error will display Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. ________________________________ Apache/2.2.3 (CentOS) Server at spacewalk2 Sorry for bad English From: [email protected] [mailto:[email protected]] On Behalf Of Joaquin Raventos Sent: Monday, February 16, 2009 4:41 PM To: [email protected] Subject: Re: [Spacewalk-list] removing channels and packages Michiel, Try running this script. Works for me to get rid of all the obsolete packages. Just change the $HOST, $user, and $pass variables to match you environment. Thanks, Joaquin ------------------------------------------------------------ #Start Script #!/usr/bin/perl use Frontier::Client; my $HOST = 'server.domain.com'; my $user = 'user'; my $pass = 'password'; my $client = new Frontier::Client(url => "http://$HOST/rpc/api"); my $session = $client->call('auth.login',$user, $pass); my $channels = $client->call('channel.software.listPackagesWithoutChannel', $session); foreach my $channel (@$channels) { print "Deleting orphaned package: ".$channel->{'name'}."\n"; $client->call('packages.removePackage', $session, $channel->{'id'} ); } $client->call('auth.logout', $session); #End Script
_______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
