I downloaded a DVD image of RHEL 8 and I want to use only the packages therein. That image already contains indexed BaseOS and AppStream repos, so I just have mount it and put a local.repo file with baseurl=file:///whatever in /etc/yum.repos.d/. Until that part, I know what to do.
Now, I want to delete any reference to other repos that might exist or might have existed in my machine. So I wiped /etc/yum.repos.d/ off any other .repo file and wiped the /var/cache/dnf/. However, when I do a $ yum info or $ yum repolist, somehow, even without internet connection, /etc/yum.repos.d/redhat.repo comes back from the dead and /var/cache/dnf/ gets repopulated. And I get curl errors because I don't have that machine connected to the internet.
I want yum to have to deal only with the repos I configured in local.repo. How do I do that?
I'm coming from sudo yum repolist show repo not in /etc/yum.repo.d and Remove yum repo using yum so I already tried the $ dnf config-manager --disablerepo, --nopluggins and other stuff in those answers.