I installed nodejs using dnf on fedora 25, then removed and installed the package from nodejs' website.

I excluded npm from dnf. Dnf stopped notifying me about npm updates but the software center is still notifying me.

Should I exclude npm from yum as well or what? It's annoying.


Fedora's package management system is meant to treat your system as composed out of a consistent set of RPMs. If you go outside of that, there's no really good way for it to handle that. You've attempted to work around this by excluding the package, but this can cause other problems (what if a different package actually requires that system version of NPM, for example).

So, instead, I'd suggest this:

Install your own NPM into /usr/local/, /opt, or /home/lynob/whatever. Adjust your paths and scripts to use that for your own stuff. Ignore the system npm completely; either don't install it, or else if installed, don't use it for the software you want the upstream version for.


Complex answer for this topic is explained on AskFedora, but in short, you just disabled the updates in DNF. The GUI is called PackageKit and ignores the DNF configuration. But it honors the exclude directive in the repo files, so you should add


to the end of /etc/yum.repos.d/fedora-updates.repo.

But is not there something wrong that upstream nodejs is providing older (lower version) of RPMs? Or their versioning is just wrong/different? Or you just want to stay on specific version?

  • I did so and also added that to /etc/yum.repos.d/fedora.repo and I tried exclude=npm too, it didn't work. The older version offered by RPM caused issues when installing Jhipster and couldn't update it using npm install -g npm. The fact that npm could update itself easily means I don't need to manage it using a package manager, thus there's no need to have the lower version. Plus I don't have to see stupid errors like npm WARN deprecated minimatch
    – Lynob
    Feb 2 '17 at 10:18
  • Try also /etc/yum.repos.d/fedora-updates.repo
    – Jakuje
    Feb 2 '17 at 10:19
  • Tried that too, nothing seems to work
    – Lynob
    Feb 2 '17 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.