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}'

2 comments:

  1. This was helpful, thanks. Not sure why there isn't a zypper option to do this already.

    ReplyDelete
    Replies
    1. Sure, I am glad it was useful for you

      Delete