Accidentally delete virtualmin repo from /etc/yum.repos.d

The history is:

For a period I had the pro license and after that I decided to downgrade it.
According to this:
I tried to downgrade but I had the same issue like :

During following this comment:
I accidentally deleted virtualmin.repo and also virtualmin.rep.rpmnew from /etc/yum.repos.d

Now I got the pro license again and want to fix it.

I also read this:
and tried to restore virtualmin.repo but I couldn’t. the response is:

package virtualmin-release-1.0-5.gpl.rhel.noarch is already installed

I also tried this:
rpm -ivh
rpm -ivh

But the response is the same.
package virtualmin-release-1.0-5.gpl.rhel.noarch is already installed

when I checked the /etc/yum.repos.d there is no virtualmin.repo

Could you please help me?
Kind Regards,

In addition I did:


and then

rpm -Uivh virtualmin-release-1.0-5.gpl.rhel.noarch.rpm

It says:
package virtualmin-release-1.0-5.gpl.rhel.noarch is already installed

but still there is no virtualmin.repo at /etc/yum.repos.d.

I appreciate any help to restore it.
P.S : Right now I can access the virtualmin panel without problem.

Hello panjeh,

  1. Could you try to deploy a Vm and install a virtualmin pro version there trial and then copy the repo files ?
  2. You have to use yum remove command ( not sure if this will remove your virtualmin itself not recommended), try to remove the repo rpm and then install only repo rpm. ( Not recommended as not sure if it will remove additional rpm)

Dear thathwamasi,
Thank you for your reply and your help.

I finally got the virtualmin.repo in such way:

Based on this comment:
As I told already I could not bring it back. but I just added “–force” to the command like:

rpm -ivh --force URL

and since I understood from the above post that I have “virtualmin-release-1.0-5.gpl.rhel.noarch” installed so for the url I put this as the URL:

Now I have a virtualmin.repo in the /etc/yum.repos.d
The content is:

[virtualmin] name=RHEL/CentOS/Scientific $releasever - $basearch - Virtualmin baseurl=$releasever/$basearch/ enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-virtualmin gpgcheck=1

name=Virtualmin Distribution Neutral Packages

then I did:

yum update

It downloaded some updates from virtualmin.

Then I put my new
Serial Number License key
in the file /etc/virtualmin-license

but didn’t do this:
wget -O*&key=; /bin/sh

since the terminal alarms you may loose the virtualmin settings.

In virtualmin panel I see:
A problem was detected with your Virtualmin license :

How can I solve this?

Dear panjeh,

Could you please try with below command,

virtualmin change-licence --serial number
–key id


Yeah whatever you do don’t re-run the installer, that’ll cause all sorts of issues :slight_smile:

The change-license command mentioned above is the best way to change your server’s Virtualmin license.

After the “Problem detected with your license” message, do you see any errors there?

Note that it’s no problem to discuss things here in the Forums, though we (the Virtualmin staff) don’t always see everything here… if at any point you don’t feel like you’re making progress, feel free to open a request in the support tracker and we can help you out there.


Dear thathwamasi,

Thank you so much for your attention and your kind support.

This command worked for me without [–no-check] . ( note: when I put [–no-check] at the end it says : Unknown parameter [–no-check] )

virtualmin change-licence --serial ***** --key *****

The response is:

Checking serial **** and key ****** .. .. valid for 10 domains until 2018-09-01

Updating Virtualmin YUM repository …
… done

Updating Virtualmin license file …
… done

Again I checked the virtualmin panel after a reboot.
It says:

Warning! A problem was detected with your Virtualmin license : The licence for this server expired on 2018-01-20 A renewal can be purchased at

I pressed the button that is below this warning “recheck the license”.

After that I saw It was resolved and the license is renewed to the new date! and there is no warning yet in the virtualmin panel.

I again checked the content of the virtualmin.repo in the /etc/yum.repos.d/ directory

[virtualmin] name=RHEL/CentOS/Scientific $releasever - $basearch - Virtualmin baseurl=http://****:*******$releasever/$basearch/ enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-virtualmin gpgcheck=1

name=Virtualmin Distribution Neutral Packages

I see the new license there! and also I see “gpl” in this url string :$releasever/$basearch/

Is it Okay?

And in the dashboard I see Virtualmin version 6.02 Pro.

I need to be sure that I will get the pro updates in the future based on the new content of virtualmin.repo on above. And it is important for me that there would be no security issue or any associated problem.

How can I check the the pro virtualmin works well? Is there a command?

Best Regards,

Dear Panjeh,
You are most welcome, happy to see everything is working fine for you.
sorry, I am not sure on how to check that as i have not used a pro license, it would be best if andreychek(Eric) replied for the last question.

Dear thathwamasi ,

Thank you, that’s very kind of you.

I will wait for Eric’s response.

Best Regards,

Dear andreychek,

I’ve just seen your reply. Thank you so much for your help and your guidance.

Best Regards,