Considering donating if you found my post helpful 😊
Preventing a package from being installed can be very useful in some cases. This guide will show you on how to do that.
Issue
I just finished installing FFmpeg by compiling its source code. I install it by compiling the source code because I need extra flags for Fraunhofer FDK AAC and AV1. Since I have it installed, I don’t want any other packages attempt to install it again via APT repositories.
Solution
Edit or create file (if not exist) /etc/apt/preferences
$ sudo nano /etc/apt/preferences
Edit and put this template into the file. Replace ffmpeg
wiht your preferred package name
Package: ffmpeg Pin: release * Pin-Priority: -1
Save the file by hitting CTRL + X and type y to confirm.
When you try to install the specified package, this will happen.
$ sudo apt install ffmpeg Reading package lists… Done Building dependency tree Reading state information… Done Package ffmpeg is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'ffmpeg' has no installation candidate
Considering donating if you found my post helpful 😊