What's the zypper command to rename a repository name?

What’s the zypper command to rename a repository name?
Not yast.

Hello colao,

This command is literally from the zypper man page:

So if you want to rename repo number 2 then you should use this command:

zypper nr 2 NewName

Good luck!:wink:

This changes the alias not the name under Service name column.
Try.

Hello colao,

You’re right, wrong command.:shame:

You should use this command:

zypper mr -n Name 1

MR stands for ModifyRepo.
The -n stands for name, the Name is the new name.
The 1 is the number of the repo, you could also put the alias, the name or the URI here.

Good luck!:wink:

To change the name (alias) of a repository the zypper command is :

renamerepo (nr) [options] <alias|#|URI> <new-alias>

I use the repository number when I rename so I do :

zypper lr

Example output:

$ zypper lr

| Alias | Name | Enabled | Refresh

–±----------------------±----------------------±--------±-------
1 | packman | Packman 11.1 | Yes | No
2 | fate | fate | No | No
3 | openSUSE-11.1-Updates | Updates for 11.1 | Yes | Yes
4 | repo-oss | openSUSE-11.1-Oss | Yes | No
5 | repo-non-oss | openSUSE-11.1-Non-Oss | Yes | No
6 | repo-debug | openSUSE-11.1-Debug | No | No

Then to rename (alias of) a repository, for example the repository number 4 | repo-oss in the list given by zypper lr above can be changed from “repo-oss” to “OSS” by:

zypper nr 4 OSS

In my reply I might not be clear on what was asked I guess. Change the alias nr. Change the display name mr.

On 2010-10-16 17:36, difficilus wrote:
>
> In my reply I might not be clear on what was asked I guess. Change the
> alias nr. Change the display name mr.

One detail: the directory name where the packages are cached goes after the alias of the repo, not
the name. I don’t know what happens to the contents of the directory if you change the alias.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)