I am reporting here the same issue that software is not updated due the error.
Unable to get list of updates:
failed to obtain lock ‘metadata’:Failed to create file"/var/run/dnf-metadata.lock.‘update session #’".Permission denied
And when you do look that there is not such a dnf-metadata.lock.‘update session #’ file. Meaning that this is a bug. Software update do not write such a file and it comes again and a again same updates.
Is this with respect to running rpm-ostree update? If so please run rpm-ostree cleanup -m to fixup your metadata. After it finishes rerun rpm-ostree update and it should finish correctly. If it is regarding flatpak then use flatpak repair to fixup your flatpak installations. After that is done, it takes awhile, run flatpak update and the flatpkas should update fine.
I understand, but I believe that in this case will be similar to “sudo dnf install …”
Was just one time action to get the gnome-software information repopulated.
DNF needs to be root because it modifies the actual system. GNOME Software communicates with daemons (background programs), but it doesn’t make any changes itself. If you have problems with it, delete ~/.cache/gnome-software; you should absolutely never need to run GUI apps as root.