Fedora/Cent Os same trouble when used yum install and interrupt it with Ctrl+Z.
Use this command:
sudo cat /var/cache/dnf/*pid
if there any pid, you can manually remove it:
sudo nano /var/cache/dnf/*pid
crtl+x followed by Y and Enter to exit nano editor (you can use any editor you want to open).
If after, delete some tmp files that may still be there:
sudo systemd-tmpfiles --remove dnf.conf