[Bug 1877650] [NEW] Fails to remove /var/lib/command-not-found/ when package is purged

Daniel Richard G. skunk at iskunk.org
Fri May 8 19:13:50 UTC 2020


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
Foundations Bugs, which is subscribed to command-not-found in Ubuntu.
https://bugs.launchpad.net/bugs/1877650

Title:
  Fails to remove /var/lib/command-not-found/ when package is purged

Status in command-not-found package in Ubuntu:
  New

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-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.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1877650/+subscriptions



More information about the foundations-bugs mailing list