How to uninstall preinstalled Virtualmin on Rockey 9 for clean reinstall

OS type and version Rocky Linux 9.0
Webmin version 2.001
Usermin version 1.860
Virtualmin version 7.2 Pro
Theme version 20.01.1:5
Package updates All installed packages are up to date

This was preinstalled and it has no and dnf remove virtualmin is not found.

I need want to do a clean install of Pro, this upgrade to Pro did not go well and had issues with several things like webalizer, and ProFTP with the wrong group name.


It’s not possible to get back to a freshly installed OS, if the exact steps to get to the state it is in now are not known.

If you want to freshly install Virtualmin, you’ll need a freshly installed OS without Virtualmin in an unknown state.

You could try to download the install script (the one on your Software Licenses page would be fine), and run it with the --uninstall flag…this is a very messy uninstall that tries to remove everything that the Virtualmin install script installs. It does not undo whatever was already done to the system by other scripts or manual steps or whatever…and may or may not get the system to a state that is fresh enough to get a clean Virtualmin install. I’m not saying this will work, but it might, and if you can’t start from a freshly installed OS with no third party packages or repos enabled, then it may be the next best thing (but again, it may not work, if your system has third party repos or packages already).

Our install script is intended to run on a freshly installed OS. I don’t know what state your system is in…I gather from your other posts that your hosting provider pre-installed Virtualmin, which is great! But, it sounds like it is somehow an incorrect installation. I don’t know what they did to make it weird (maybe installed before we supported Rocky 9, maybe enabled some other third party repos…the ProFTPd error makes me think you have a different ProFTPd package than we install, which would likely be due to having some other third part repos enabled). There are so many pieces in a Virtualmin system, it is impossible for us to accommodate every possible combination of packages from every third party repo out there (we can barely stay on top of the official repos of the distros we support).

Understood, I found this page shows the same thing since a new image would be the same, with a preinstalled version that may not be the newest, Alma may be the same also, it is anyway, no way of knowing, my VPS host did not know this was preinstalled, that would suck if it was on Alma because I would be in the same boat again, only this time where do I go, also where does that leave anyone stuck with one of these OS’s, they can never get a clean OS, I might be better off resetting this VPS with Rockey 9 again, doing the uninstall which was my first thought, but that will only be a little cleaner and not much, so it would be better to switch to Alma and hope is it, I cannot ask for another OS reset for a while, so I might be stuck with this one, or pay for the upgrade.

I will do the uninstall, do a locate . *virtualmin* and clean up files, I am sure the uninstall will kill all the processes, I will find locks during the clean-up and delete them, and disable the process, so I can get as near to clean that the script will do a proper install.

I will update this thread in case someone else has this issue.


That probably isn’t where the problem lies. It’s probably weirdness in the dependencies.

It may be that the config files (found in /etc/webmin, which you can delete after you do --uninstall if it sticks around for some reason) are wrong because the OS was detected wrong during installation (which could have happened if installed before Virtualmin and Webmin had support for Rocky 9).

I just took a look : locate . *webmin*

I will have to /etc/webmin/ and clean that up, what else can I do?

I did install Multiple PHP versions for 7, so that will be a mess to clean up also.

I keep getting file locks with php-fpm systemctl restart php-fpm.service; systemctl status php-fpm.service

ERROR: Another FPM instance seems to already listen on /var/php-fpm/132835957415840.sock

I can do this:

kill -9 ps ax | grep php-fpm | grep 132835957415840 | head -n1 | awk '{print $1;}';
rm -f /var/php-fpm/132835957415840.sock; 
systemctl restart php-fpm.service; 
systemctl status php-fpm.service

And get another number, it is chasing for a free PID sock name, crazy, not sure if this has been reported or just part of a bad installation, but I would look into the naming of the socket or PID lock file and see why I have this race is going on, but I will wait till I get a good install before diving into strange things.


I don’t think that would do anything useful. The Virtulamin with the --uninstall flag will already uninstall Webmin (it uninstalls every package the installer installs, which obviously includes Webmin).

I don’t see any reason to try to troubleshoot PHP-FPM if you’re reinstalling. I am unaware of any outstanding PHP-FPM issues (and we’d probably hear about it pretty quick, since that’s the only supported PHP execution mode on some distros, now).

Thanks, the last question, I am new to Rocky 9, I have keyed all my sites so I can ssh in without passwords, but the root will not work, the only setting I can find is the ssh_config, it said root is enabled for ssh access, what else is there, I cannot imagine this a right, but not related to this issue at hand, other than having to put my password in every time.

Please start new topics for new questions.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.