OpenSUSE 13: Add package repository

This article will describe adding package repository.

1 Add repository

Add repository with "zypper ar". You need to import GPG key which can be skipped with –gpg-auto-import-keys option. Base repository is here and additional repository is here.

> sudo zypper ar -f packman
> sudo zypper -n --gpg-auto-import-keys up

"zypper lr" shows added repository list.

> zypper lr

"zypper mr -d" disables repository and "zypper mr -e" enables it. Because DEBUG repository takes a time to update, disable it usually and enable when you need to debug package.

> sudo zypper mr -d 'packman' # Disable repository 'packman'
> sudo zypper mr -e 'packman' # Enable repository 'packman'

2 Remove repository

Remove repository with "zypper rr". If you want to disable repository, you should use "zypper mr -d".

> sudo zypper rr 'packman'

3 Replace existing package (vendor change)

Existing package from base repository might be replaced by package in additional repository. –force-resolution option will replace package without interactive.

> sudo zypper -n in --force-resolution vlc
The following package is going to change vendor:
  libbluray1  openSUSE ->