#1108440 apt: "apt-get clean" breaks "dpkg -l" bash-completion

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Date:
2025-06-28 18:05:03 UTC
Severity:
normal
#1108440#5
Date:
2025-06-28 17:54:09 UTC
From:
To:
Dear Maintainer,

since upgrading from Bookworm to Trixie, "apt-get clean" also removes the cache
files in /var/cache/apt/. This breaks bash-completion for "dpkg -l" because
it reads /var/cache/apt/pkgcache.bin.

Steps to reproduce the error:

1. apt-get clean
2. dpkg -l base<TAB>  # prints nothing

Steps to reproduce normal behaviour:
1. apt-cache gencaches
2. dpkg -l base<TAB>  # prints "base-files" etc.