Showing posts with label cut. Show all posts
Showing posts with label cut. Show all posts

Monday, September 24, 2012

How to remove all repositories using zypper

If you need to remove all repositories, use this command:

zypper repos | grep Yes | cut -f3 -d '|' | sed -e "s/ //" | awk '{print "zypper rr " $1}' | bash

I would suggest first to try to see the output of the command without the last bash:

zypper repos | grep Yes | cut -f3 -d '|' | sed -e "s/ //" | awk '{print "zypper rr " $1}'