I want to install mesa 18 from stretch-backports. Currently all the mesa related packages were marked as automatically installed and I want to keep it that way.

If I simply do

$ sudo apt upgrade -t stretch-backports

It updates mesa but also too many other programs. Is there way to only upgrade packages coming from the mesa source package? Or maybe apt-pin based on source package instead of binary package?


You should always avoid upgrading using -t stretch-backports since backports aren’t a coherent set of packages.

To upgrade all Mesa packages without marking them as manually installed, install them and then unmark them:

sudo apt install -t stretch-backports $(grep-status -S mesa -a -FStatus "install ok installed" -s Package -n | sort -u)
sudo apt-mark auto $(grep-status -S mesa -a -FStatus "install ok installed" -s Package -n | sort -u)

This lists all installed packages which come from the Mesa source package, using grep-status (part of the dctrl-tools package), installs them from backports, and marks them as automatically installed.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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