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}'
A blog about tips and tricks for linux - as I do some development, sometimes I find some good staff which I would like to store somewhere. I will be happy if you find this stuff to be useful for any reason.
Showing posts with label repository. Show all posts
Showing posts with label repository. Show all posts
Monday, September 24, 2012
Monday, September 17, 2012
Export or import list of repositories in Linux for yast2
If you need to migrate your linux yast2 repositories from one machine to another, you can do the following:
Export list of yast2 repositories into a text file:
zypper lr –export
By default it saves the list of repositories in xport.repo file
On machine 2 you may import the list created by the command above, into the system by importing the list of repositories:
zypper ar -r xport.repo
"ar" stands for "Add Repository", whereas "lr" stands for "list repositories"
Export list of yast2 repositories into a text file:
zypper lr –export
By default it saves the list of repositories in xport.repo file
On machine 2 you may import the list created by the command above, into the system by importing the list of repositories:
zypper ar -r xport.repo
"ar" stands for "Add Repository", whereas "lr" stands for "list repositories"
Subscribe to:
Posts (Atom)