Public bug reported: 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-not-found* 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/command-not-found' not empty so not removed # ls -l /var/lib/command-not-found/ 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.db.metadata I'm purging the package, these files clearly belong to it, that directory should be gone. (Side note: apt-get should be reporting "python3-commandnotfound is no longer needed," since command-not-found is the only package that depends on it, but for some reason this isn't happening. That's why I had specified the --autoremove; I was expecting to remove two packages.) ** Affects: command-not-found (Ubuntu) Importance: Undecided Status: New ** Tags: focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1877650 Title: Fails to remove /var/lib/command-not-found/ when package is purged To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1877650/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs