

You can also block packages via their architecture here. Let us try to install the blocked package, nginx. Press Ctrl + X to save the file when finished and enter Y when prompted. This is especially useful for holding back graphics drivers. The locked package will remain on the same version even if you upgrade your system. If you want to exclude more than one packages, you can separate their names by space. If you want to stop all nginx packages then you can use the * character. If you want to hold a package, for example, nginx from being installed, updated or removed, append the following line at the end of the file. Ĭachedir=/var/cache/yum/$basearch/$releasever To lock a package permanently from being installed, updated or removed, we can use the /etc/yum.conf file. Method 1 – Permanently Disable Package Install/Updates (Using yum.conf)


But sometimes occasions arise when you need granular control over which package you want to install or upgrade and which package to block from being upgraded automatically. You can install, upgrade and remove any software/package from your Linux system with a single command. Package manager is probably the most useful tool for a Linux user.
