Fails to remove /var/lib/command-not-found/ when package is purged
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
command-not-found (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This concerns command-not-found 20.04.2 in Ubuntu focal.
The apt-get invocation largely tells the story:
# apt-get --purge --autoremove remove command-not-found
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
command-
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 35.8 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 95222 files and directories currently installed.)
Removing command-not-found (20.04.2) ...
(Reading database ... 95216 files and directories currently installed.)
Purging configuration files for command-not-found (20.04.2) ...
dpkg: warning: while removing command-not-found, directory '/var/lib/
# ls -l /var/lib/
total 3020
-rw-r--r-- 1 root root 3084288 May 8 14:54 commands.db
-rw-r--r-- 1 root root 2442 May 8 14:54 commands.
I'm purging the package, these files clearly belong to it, that directory should be gone.
(Side note: apt-get should be reporting "python3-
Thanks for reporting.
I get the same warning when running `sudo apt purge command-not-found` on Ubuntu Groovy. I suppose these files are generated, but not marked as part of command-not-found.
`dpkg -S /var/lib/ command- not-found` correctly identifies that the directory is part of `command-not-found` (when the package is installed), but is unable to find matches for the files contained within.