If you know any other preferred way, do let us know via comments or if you were looking for yum command to disable/lock package update, then read this below article. In this article, we’ve explained few ways to disable/block or blacklist package updates using APT way. To List what packages have updates pending. Installed packages on a system can be upgraded to the latest available version using: sudo apt upgrade With upgrade command, packages will be installed if required to satisfy dependencies, but existing packages will never be removed. The apt tool gives you freedom to choose what you want to update, but for this you should have knowledge about what all packages are available for up-gradation.įor such a thing, following set of commands can prove to be helpful:Ī. This would block apt for searching for further updates of that package.įor example, to blacklist a package from being update add the entry as shown: Never-MarkAuto-SectionsĪnother alternative for this is to choose what you want to update. Just enter the name of the package at the end in Never-MarkAuto-Section and Save and Close the file. Now, for blacklisting any package, just need to enter its name in Never-MarkAuto-Sections. Blacklist a Package Update using APT Autoremove FileĪnother way to blacklist a package from installation is to update its entry in one of the files contained in /etc/apt// directory which is 01autoremove. Would mean to pull the stated package from Debian package experimental archive. Like: Pin: release o=Debian,a=Experimental We can use other options with release keyword for further identifying the package on which we are applying the Pin Priority. Here, priority (Here, '*' means all packages)įor example to block updates for package apache2 add the entry as shown: Package: apache2īlock Package Update Using Preference File To block the package, you just need to enter its name, additional feature, and to what priority you want to take it to. This file holds responsibility of updating or blocking certain package updates according to priority specified by the user. Hold Package Update in Ubuntu/Debian Blocking Package Updates Using APT Preferences FileĪnother way to block updates of a specific package is to add its entry in /etc/apt/preferences or /etc/apt/preferences.d/official-package-repositories.pref file. To make this package available for update, just replace ‘ hold‘ with ‘ unhold‘.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |