I can confirm the problem is present in Debian GNU/Linux 9.11 (stretch) and Ubuntu 18.04.3 LTS. I noted the issue after run by the second time an Ansible playbook with the apt module. As a workaround, I set `force_apt_get: yes` in the apt module.
It's very odd this behavior because in my case the file `/var/lib/aptitude/pkgstates` already existed. The first time I ran `aptitude update`, the command cleared all hold flag in packages that had set before; also 'hold' was removed from the status field here `/var/lib/dpkg/status`. Then I marked again the packages with the hold flag and I run `aptitude update`, `aptitude safe-upgrade`, `apt-get update`, `apt-get upgrade`, `apt update` and `apt upgrade` without issues. Any hints are welcome! Thanks in advance!! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1817350 Title: Running 'aptitude update' clears hold flags on packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/1817350/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs