How to remove a source package

,

Hi there,
I have no idea if here is the place to ask this, but I recently accidentally installed an RPM package through DNF5 and installed the source package rather than the build one. So, I am trying to remove it to install the correct one, and I get this message:

Argument ‘displaylink.src’ matches only source packages.

Nothing to do.

Can anyone help me out on what to do?

Thanks in advance

Problem

Cause

Not yet known.

Related Issues

Bugzilla report: #NNNN

Workarounds

None yet.

What’s the „wrong“ package that you installed?

What happens if you run

sudo dnf remove <unwanted-package>

No, it is not, but we moved it to the right category: Ask Fedora . Please read the instructions in the template text next time, thank you :slight_smile:

Hey,

the package is displaylink => https://github.com/displaylink-rpm/displaylink-rpm/releases

I installed the src one rather than the x86 for fedora41.

once I run dnf remove, this is what I get:

sudo dnf remove displaylink.src

Argument ‘displaylink.src’ matches only source packages.

Nothing to do.

Thanks a lot, and sorry about it. I’ll be more careful next time

What happens if you only run dnf remove displaylink?

Hi there,

sudo dnf remove displaylink

Argument ‘displaylink’ matches only source packages.

Nothing to do.

And what happens, if you just install the correct build package again instead?

If you downloaded and installed fedora-41-displaylink-1.14.7-4.github_evdi.src.rpm then to un-install it is

dnf remove displaylink-1.14.7-4.github_evdi.src

You can find the package name by running dnf list displaylink*'or by runningrpm -qa displaylink*'.

1 Like

there you go:

sudo dnf install ‘./fedora-41-displaylink-1.14.7-4.github_evdi.x86_64.rpm’

Updating and loading repositories:
Repositories loaded.
Package Arch Version Repository Size
Installing:
displaylink x86_64 1.14.7-4.github_evdi @commandline 14.9 MiB
Installing dependencies:
dkms noarch 3.1.4-3.fc41 updates 187.6 KiB

Transaction Summary:
Installing: 2 packages

Total size of inbound packages is 7 MiB. Need to download 83 KiB.
After this operation, 15 MiB extra will be used (install 15 MiB, remove 0 B).
Is this ok [y/N]: y
[1/1] dkms-0:3.1.4-3.fc41.noarch 100% | 347.9 KiB/s | 83.1 KiB | 00m00s

sudo dnf remove fedora-41-displaylink-1.14.7-4.github_evdi.src.rpm

You uninstall by package name and not by file name, so no .src suffix.

dnf remove displaylink-1.14.7-4.github_evdi.src

Unfurtunalely, this doesn’t work either as it turns out.

1 Like

The content of the source package should only be unpacked somewhere in the structure, probably /usr/src/, it should not be installed per se. You can as well forget about it.

Ok, so:

sudo dnf remove displaylink-1.14.7-4.github_evdi.src

Argument ‘displaylink-1.14.7-4.github_evdi.src’ matches only source packages.

Nothing to do.

if I run:

sudo dnf list displaylink*

zsh: no matches found: displaylink*

But If I do:

sudo dnf list displaylink

Updating and loading repositories:
Repositories loaded.
Installed packages
displaylink.src 1.14.7-4.github_evdi @commandline

so if I do:

sudo dnf remove displaylink.src
Argument ‘displaylink.src’ matches only source packages.

Nothing to do.

This has told you that the package is now installed.

After a bit of experiment, the only way I could remove the src package is by

 rpm -e displaylink

That also remove the files that was installed in /root/rpmbuild.

1 Like

Yes, this worked out.

once I run that I reinstalled and displaylink is working again.

I’ll check later at the rpm docs. Thanks again!