Zypper auto-refresh

Hello,

I’m trying to understand zypper auto-refresh. As far as I understand, I’ve enabled auto-refresh:

$ zypper lr -P
# | Alias                            | Name                                   | Enabled | GPG Check | Refresh | Priority
--+----------------------------------+----------------------------------------+---------+-----------+---------+---------
5 | packman                          | packman                                | Yes     | (r ) Yes  | Yes     |   90
1 | download.opensuse.org-non-oss    | Main Repository (NON-OSS)              | Yes     | (r ) Yes  | Yes     |   99
2 | download.opensuse.org-oss        | Main Repository (OSS)                  | Yes     | (r ) Yes  | Yes     |   99
3 | download.opensuse.org-tumbleweed | Main Update Repository                 | Yes     | (r ) Yes  | Yes     |   99
4 | openSUSE-20230822-0              | openSUSE-20230822-0                    | No      | ----      | ----    |   99
6 | repo-debug                       | openSUSE-Tumbleweed-Debug              | No      | ----      | ----    |   99
7 | repo-openh264                    | Open H.264 Codec (openSUSE Tumbleweed) | Yes     | (r ) Yes  | Yes     |   99
8 | repo-source                      | openSUSE-Tumbleweed-Source             | No      | ----      | ----    |   99

Why is it then that zypper still prompts me to refresh the repositories? I thought they would auto-refresh?

$ zypper se firefox
Repository 'Main Repository (NON-OSS)' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Main Repository (OSS)' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'packman' is out-of-date. You can run 'zypper refresh' as root to update it.
[...]

Thank you for your help!

You need to be root to refresh repositories.

1 Like

Thank you for your answer. :+1:
You are right. With su the repositories are automatically refreshed.

# zypper se firefox
Retrieving repository 'Main Repository (NON-OSS)' metadata .................................................................................................................[done]
Building repository 'Main Repository (NON-OSS)' cache ......................................................................................................................[done]
Retrieving repository 'Main Repository (OSS)' metadata .....................................................................................................................[done]
Building repository 'Main Repository (OSS)' cache ..........................................................................................................................[done]
Retrieving repository 'packman' metadata ...................................................................................................................................[done]
Building repository 'packman' cache ........................................................................................................................................[done]
Loading repository data...
Reading installed packages...
[...]