Why can't i remove this software from Fedora?

Fedora version: 34

Back in January 2021, I have installed VirtualBox software in my Fedora 34 PC.
I installed it by executing “VirtualBox-6.1.18-142142-Linux_amd64.run” file I downloaded from VirtualBox’s website. Yes, it wasn’t a repo based installation.

Now, I want to remote VirtualBox software from my Fedora PC. This is because I want to install a new version of Virtualbox and “dnf upgrade” command does not seem to upgrade Virtualbox’s packages.

As you see from dnf search output, VirtualBox-6.1.x86_64 software is installed in my PC.
But, I cannot remove it using sudo dnf remove VirtualBox commands . My attempts are shown below.

So, I checked Fedora’s ‘Software’ GUI thing. But, I don’t see VirtualBox listed there either.
Any idea why this is happening ? And how can I remove this software ?

[kepler@localhost ~]$ sudo dnf search VirtualBox
Repository vivaldi is listed more than once in the configuration
Last metadata expiration check: 1:43:20 ago on Sat 21 Aug 2021 04:00:29 PM CEST.
===================================================================== Name Exactly Matched: VirtualBox ======================================================================
VirtualBox.x86_64 : A general-purpose full virtualizer for PC hardware
==================================================================== Name & Summary Matched: VirtualBox =====================================================================
VirtualBox-6.1.x86_64 : Oracle VM VirtualBox
VirtualBox-devel.x86_64 : VirtualBox SDK
VirtualBox-kmodsrc.noarch : VirtualBox kernel module source code
VirtualBox-server.x86_64 : core part (host server) for VirtualBox
VirtualBox-webservice.x86_64 : WebService GUI part for VirtualBox
akmod-VirtualBox.x86_64 : Akmod package for VirtualBox kernel module(s)
kmod-VirtualBox.x86_64 : Metapackage which tracks in VirtualBox kernel module for newest kernel
python3-VirtualBox.x86_64 : Python3 bindings for VirtualBox
virtualbox-guest-additions.x86_64 : VirtualBox Guest Additions
======================================================================== Summary Matched: VirtualBox ========================================================================
RemoteBox.noarch : Open Source VirtualBox Client with Remote Management
fence-agents-vbox.noarch : Fence agent for VirtualBox
libvirt-daemon-driver-vbox.x86_64 : VirtualBox driver plugin for the libvirtd daemon
libvirt-daemon-vbox.x86_64 : Server side daemon & driver required to run VirtualBox guests
[kepler@localhost ~]$ 
[kepler@localhost ~]$ sudo dnf remove VirtualBox
Repository vivaldi is listed more than once in the configuration
No match for argument: VirtualBox
No packages marked for removal.
Dependencies resolved.
Nothing to do.
[kepler@localhost ~]$ 
[kepler@localhost ~]$ sudo dnf remove VirtualBox.x86_64
Repository vivaldi is listed more than once in the configuration
No match for argument: VirtualBox.x86_64
No packages marked for removal.
Dependencies resolved.
Nothing to do.
[kepler@localhost ~]$ 
[kepler@localhost ~]$ sudo dnf remove VirtualBox\*
Repository vivaldi is listed more than once in the configuration
No match for argument: VirtualBox*
No packages marked for removal.
Dependencies resolved.
Nothing to do.
[kepler@localhost ~]$ uname -a
Linux localhost.localdomain 5.13.4-200.fc34.x86_64 #1 SMP Tue Jul 20 20:27:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[kepler@localhost ~]$

Well. As you said, you haven’t installed virtualbox from an RPM repository. So, from the point of view of DNF, the package isn’t installed. What you see with sudo dnf search VirtualBox is the content of some repository. But again, you haven’t installed virtualbox from any repository, so there is nothing to remove.
It is like if you create a file then you try to remove it with dnf: it is not the way to go.

Said that, probably there is a script or a program shipped with the way you installed virtual box that you can use to uninstall it.


If you installed it manually, you need to remove it manually. That package manager only manages packages installed by the package manager.

Does the VirtualBox-6.1.18-142142-Linux_amd64.run file have an option to uninstall?


That’s because the package‘s name is:


Usually a .run file extracts the content into a subdirectory where the file is located, then runs the make and install from there.
I would look in that subdirectory and find the Makefile, then run “sudo make uninstall” in that directory. It usually works to do the uninstall that way.

If not then you can probably read the “install” stanza of the Makefile and reverse what it does by hand.


the uninstall command is:

sudo VirtualBox-*-Linux_amd64.run uninstall;

in case you lost the run package somehow you need to download it again and do an (sudo) chmod u+x *.run before the above command.
also check what is left under /opt/ afterwards


Thank You Sixpack13. Thanks everyone.

Luckily, I still had the VirtualBox-6.1.18-142142-Linux_amd64.run file in the Downloads directory.
And I uninstalled it using "

$ sudo ./VirtualBox-6.1.18-142142-Linux_amd64.run uninstall

" as suggested by Sixpack13.

Googling didn’t help.

After the uninstallation, I did a repo based installation of VirtualBox using the steps in the below link

There are no clear steps for repo-based installation in the following URL from VirtualBox


All they provide (on the same URL) is some stuff about .asc file under the heading ‘RPM-based Linux distributions’

You said the package name is


As a relative newbie in Fedora, I find it a bit difficult to determine the package name.

rpa -q output shows the following for VirtualBox’s package.
So, as a newbie like me, it can be VirtualBox or even VirtualBox-6.1-6.1.26_145957.
Is there a recommended way to determine the package name of a software ?

$ rpm -qa | grep -i virtualbox

In cases where the name may be capitalized you can still find if it is there by doing something like
"dnf list ‘*irtual*’
and you will see that VirtualBox is in the rpmfusion-free repo.

1 Like

dnf list is not case sensitive so you can just do:

$ dnf list virtualbox\*                                                                                                                     
Last metadata expiration check: 2:05:05 ago on Sun 22 Aug 2021 06:24:18 AM CDT.
Installed Packages
VirtualBox.x86_64                                                           6.1.26-2.fc34                                            @rpmfusion-free-updates
VirtualBox-kmodsrc.noarch                                                   6.1.26-2.fc34                                            @rpmfusion-free-updates
VirtualBox-server.x86_64                                                    6.1.26-2.fc34                                            @rpmfusion-free-updates
Available Packages
VirtualBox-devel.x86_64                                                     6.1.26-2.fc34                                            rpmfusion-free-updates 
VirtualBox-webservice.x86_64                                                6.1.26-2.fc34                                            rpmfusion-free-updates 
virtualbox-guest-additions.x86_64                                           6.1.26-1.fc34                                            updates     
1 Like

sudo dnf repoquery --installed --qf %{name} "package you are looking for"

dnf repo query

rpm -qa -qf %{name}\n' "package name"

You can use wildcards in either of those ie … virt*

1 Like

nothing to thank for.
just share your new knowledge to the next newbee…


FYI for next time, on Linux_Downloads – Oracle VM VirtualBox the “Fedora 33 / 34” link downloads an rpm, and that rpm will install a repo for the official VirtualBox builds and is visible to dnf. In my experience it has worked more smoothly than the ones built by Fedora itself (also fewer dependencies). The official package is VirtualBox-6.1, the Fedora one is VirtualBox.

The primary issue here was using the .run file from the “All distributions” link.