Remove yum repo using yum

package-managementrepositoryyum

I have no root access on my machine at work, but I have sudo permission to use sudo yum (and only yum).

Recently I accidentally installed a faulty repository (dropbox), and now I'd like to remove it. Since I have no write access to the yum.repos.d directory, manually editing or removing the repo file is out of the question.

I know you can install repos using yum (it's what I did), but can you remove a repo using yum?

Using Scientific Linux 6.

By the way, I know I can yum --disablerepo= to ignore the problematic repo. But I would like to remove it for good, because it's also causing problems with the graphical package manager (it keeps popping up notifications saying the updates couldn't be retrieved).

Best Answer

you can remove the repo with yum-config-manager but not with yum:

yum-config-manager --disable repository
yum-config-manager --add-repo http://www.example.com/example.repo

EDIT: you need some way of running this as root (ie. sudo)

Related Question