I did sudo apt-mark hold nameofthepackage
on 3 packages, but now I have an annoying remark when I upgrade with sudo apt-get upgrade
:
Following packages have been holded :
package1 package2 package3
0 upgraded, 0 installed, 0 to remove and 3 non-updated.
(I'm sorry about the unexact output of the terminal, I'm using a french-version and I don't know exactly how to say this in english.)
Does it exist a way of "hiding" this ? I would like to have the usual 0 non-updated
even when I hold packages. Thanks
Best Answer
Pin a package version using Apt Preferences
Check current priority policy for my package, Example with
virtualbox
:Create new file in
/etc/apt/preferences.d/
Add package you want (joker
*
can be used), with higher priority (default0
, max1000
, or even negative value like-1
to skip a version)Check again:
No need to use hold, So
sudo apt-mark unhold virtualbox
but you could leave it as 2nd lock.Now, if I check
apt-get update
, nothing is mentioned about aboutvirtualbox
(In held back packages listing).#
can be used to comment lines in APT Preferences files.