42

Does yum's --enablerepo option only enable a repository for the duration of the current command?

For example if the enabled setting in /etc/yum.repos.d/remi.repo file is set to 0 (disabled) and I run:

yum --enablerepo remi,remi-php55 install php

Are the repositories specified (remi and remi-php55) only enabled for the duration of the install command?

Is there a way to persist the enabled setting using yum instead of editing a .repo file directly?

1 Answer 1

61

The --enablerepo option overides the permanent option set in the .repo file for only the current command. --disablerepo does the opposite for enabled repos.

If you install (or have installed) the yum-utils package then you can use yum-config-manager to permanently enable/disable repos without editing the file:

yum-config-manager --enable remi

will permanently enable the remi repo.

yum repolist all

will list all the repo id which you use with the --enable or --disable option.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .