Who created unbound folders

I have a Fedora Workstation installation, and I have not installed unbound. Yet I have /var/lib/unbound and /etc/unbound which are freshly modified and read. /var/lib/unbound is even owned by user unbound. Though there is no unbound.conf. I checked system-monitor, but there is no process owned by unbound user.
What process created and is using those folders? I’m guessing one of systemd service since only root can impersonate other users.

p.s. I thought I was configuring my unbound installation on my server, until I realized I wasn’t looking at files on the server but my own PC.

You can find out by running these command:

rpm -qf /etc/unbound

and

rpm -qf /etc/unbound/*

Similar for any other file or directory you might be interested in.

5 Likes

If you didn’t install unbound, it may be a dependency of another package that you installed. You can check

dnf repoquery --installed --whatrequires unbound

or simply

repoquery --installed --whatrequires unbound

If you want to check with which attributes files and directories of unbound are created, check Tree - rpms/unbound - src.fedoraproject.org and Tree - rpms/unbound - src.fedoraproject.org and above and below.

2 Likes
sudo dnf --assumeno remove /var/lib/unbound
2 Likes

Thanks for the replies. The files belongs to unbound-libs unbound-anchor and was possibly installed during Fedora 38 upgrade.
Though I wonder why dnf autoremove doesn’t include them, is there a way to see the reason?

commands
$ rpm -qf /etc/unbound/*
unbound-libs-1.17.1-2.fc38.x86_64
unbound-anchor-1.17.1-2.fc38.x86_64
unbound-libs-1.17.1-2.fc38.x86_64

$ dnf repoquery --installed --whatrequires unbound-libs
python3-unbound-0:1.17.1-2.fc38.x86_64
unbound-anchor-0:1.17.1-2.fc38.x86_64

$ dnf repoquery --installed --whatrequires unbound-anchor
$ dnf repoquery --installed --whatrequires python3-unbound

$ sudo dnf --assumeno remove /etc/unbound
Removing:
 unbound-libs
Removing dependent packages:
 python3-unbound
Removing unused dependencies:
 unbound-anchor

$ rpm -qi unbound-anchor
Install Date: Thu 20 Apr 2023 21:09:20 UTC

$ dnf history
ID     | Command line    | Date and time    | Action(s)      | Altered
----------------------------------------------------------------------
    85 |                 | 2023-04-20 21:06 | D, E, I, U     | 1906

$ sudo dnf autoremove
Last metadata expiration check: 6:18:27 ago on Wed 12 Jul 2023 09:53:14 UTC.
Dependencies resolved.
Nothing to do.

dnf repoquery --userinstalled lists a screen full of packages, but those 3 are not in the list.

You can dnf history command to find when those rpms where installed.
Don’t have the exact dnf command at my finger tips.

Parts of gnutls needs some library provided by unbound-libs.

Welp I think I found it. python3-unbound is recommended by python3-dnf which is required by base system (anaconda, dnf etc.). It then brought in the 2 dependencies. And because it’s only recommended not required, dnf shows them ok to be uninstalled.

commands
$ dnf repoquery --installed --whatdepends python3-unbound
python3-dnf-0:4.16.1-1.fc38.noarch

$ dnf repoquery --installed --whatrecommends python3-unbound
python3-dnf-0:4.16.1-1.fc38.noarch

$ dnf repoquery --installed --whatrequires python3-dnf
anaconda-core-0:38.23.4-2.fc38.x86_64
dnf-0:4.16.1-1.fc38.noarch
python3-dnf-plugins-core-0:4.4.1-1.fc38.noarch
python3-libreport-0:2.17.11-1.fc38.x86_64