I have read URPMI from Mageia wiki but there seems to be no mention of how I can check the currently enabled media using urpmi command. There is urpmi.addmedia and urmpi.removemedia. So I tried doing urpmi.listmedia but it obviously isn't an existing command.

Any way I can check this? Do note that I don't have any X Windows installed so I need to do this via command line.

3 Answers 3


The file you are looking for is /etc/urpmi/urpmi.cfg. If the file is not enabled, the entry will list 'ignore' as an option. If it does not state 'ignore', then it is enabled.


For completeness sake, here are all possibilities:

urpmq --dump will show the interpreted configuration from /etc/urpmi/urpmi.cfg , one repo per line:

[doktor5000@Mageia4 ~]$ urpmq --dump local-noarch /home/doktor5000/rpmbuild/RPMS/noarch local /home/doktor5000/rpmbuild/RPMS/x86_64 "Core Release (distrib1)" http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/4/x86_64/media/core/release --update "Core Updates (distrib3)" http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/4/x86_64/media/core/updates [...snip...] --update google-chrome http://dl.google.com/linux/chrome/rpm/stable/x86_64

Another useful one would be urpmq --list-media active --list-url which will show all currently active repos including complete URLs so you see which mirror is used. This is partly mentioned on the wiki page you cited: urpmq

[doktor5000@Mageia4 ~]$ urpmq --list-media active --list-url local-noarch /home/doktor5000/rpmbuild/RPMS/noarch Core Release (distrib1) http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/4/x86_64/media/core/release [...snip...] google-chrome http://dl.google.com/linux/chrome/rpm/stable/x86_64

If you're using the default $MIRRORLIST mechanism then it's a little harder to show the chosen mirror. urpmq --sources rpm will work, this shows the complete URL for any given package. $ urpmq --sources rpm http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/4/x86_64/media/core/release/rpm-4.11.1-8.mga4.x86_64.rpm

You can also grep the mirror cache file to see which mirror has been chosen grep chosen /var/cache/urpmi/mirrors.cache

All these methods should be easier then directly looking at /etc/urpmi/urpmi.cfg

If you want to see more tips about urpmi and rpm, check our MAQeia about software & package management hints


Checking the file /etc/urpmi/urpmi.cfg works as @slafat01 mentioned.

There is also the command:

[user@localhost ~]# urpmq --list-media
...<list of media>...

From man urpmq

--list-media [type]
    List available media. You can optionally add a type selector: all will list all
    media (the default), update to list update media, or active to list only
    active media.

You must log in to answer this question.

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