Can't install nor uninstall VirtualBox

OK, I f*cked up…
I downloaded VirtualBox 7 from Oracle, since “install virtualbox” didn’t work. (I know now it has to be “sudo dnf install VirtualBox-7.0”). So I removed it, with Discover (that’s how I also installed the rpm-package). But then I also searched a bunch of files and folders names VirtualBox, found with Catfish.
Shouldn’t have done that… Now, if I try to install with the terminal, it says the packages is already installed. If I try to remove, it fails:

  Uitvoeren van scriptlet: VirtualBox-7.0-7.0.14_161095_fedora36-1.x86_64                                 1/1 
/var/tmp/rpm-tmp.a2WBIm: regel 6: /usr/lib/virtualbox/prerm-common.sh: Bestand of map bestaat niet
fout: %preun(VirtualBox-7.0-7.0.14_161095_fedora36-1.x86_64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package VirtualBox-7.0
  Verifiëren             : VirtualBox-7.0-7.0.14_161095_fedora36-1.x86_64                                 1/1 

Mislukte:
  VirtualBox-7.0-7.0.14_161095_fedora36-1.x86_64

The same when I try to reinstall it, or to install or remove with Discover.
I tried sudo rpm --verify VirtualBox-7.0, and then there comes a long list of missing files (duh).
sudo dnf check says I miss libvpx.so.7()(64bit), which I then installed (libvpx.so.7) but it keeps missing that same thing.

How can I “clean up” this stuff?

EDIT: to be complete, sudo dnf reinstall VirtualBox-7.0 gives:

Laatste metadata-expiratie-check: 0:14:47 geleden op zo 17 mrt 2024 16:18:12.
Geïnstalleerd pakket VirtualBox-7.0-7.0.14_161095_fedora36-1.x86_64 (van @System) is niet beschikbaar.
Fout: Geen pakketten voor herinstallatie aangemerkt.

I fixed it! By running sudo dnf reinstsall, but then copying the rpm-package to the terminal window, the reinstallation worked.