#990191 xml-core: leftovers on package purge

Package:
xml-core
Source:
xml-core
Submitter:
Christoph Anton Mitterer
Date:
2026-05-07 09:41:02 UTC
Severity:
normal
#990191#5
Date:
2021-06-22 12:18:53 UTC
From:
To:

Hi.

It seems the package purge has some issues:
Purging configuration files for xml-core (0.18+nmu1) ...
dpkg: warning: while removing xml-core, directory '/etc/xml' not empty so not removed


the directory is then however empty, but never again cleaned up.


Cheers,
Chris.

#990191#10
Date:
2021-08-20 11:21:30 UTC
From:
To:
Hello


On Tue, 22 Jun 2021 14:18:53 +0200 Christoph Anton Mitterer  <calestyo@scientia.net> wrote:

 > Package: xml-core
 > Version: 0.18+nmu1
 > Severity: normal
 >
 >
 >
 > Hi.
 >
 > It seems the package purge has some issues:
 > Purging configuration files for xml-core (0.18+nmu1) ...
 > dpkg: warning: while removing xml-core, directory '/etc/xml' not
empty so not removed
 >
 >

...

I get the following error message:
--- Removing xml-core (0.18+nmu1) ... Purging configuration files for xml-core (0.18+nmu1) ... dpkg: warning: while removing xml-core, directory '/etc/sgml' not empty so not removed
--- Are you sure it is /etc/xml in your error message?      - Tommi Höynälänmaa
#990191#15
Date:
2021-08-23 01:43:45 UTC
From:
To:
Hey.

Yes I'm pretty sure it was /etc/xml, since I've simply copy&pasted the
excerpt from apt's ouput.


Also it couldn't have been /etc/sgml on my system, since this is still
"owned" by several packages:

$ dpkg -S /etc/sgml
docbook-xml, sgml-data, docutils-common, xml-core: /etc/sgml


Thanks,
Chris.

#990191#20
Date:
2026-05-06 12:58:14 UTC
From:
To:
Hello Christoph,

Thnak you for reporting this issue. However after investigate that the
/etc/sgml folder is shared between multiple packages. And xml-core
package is one of the package writes it's file as /etc/sgml/xml-core.cat
in the folder.

When user purge xml-core. The package did clean up
/etc/sgml/xml-core.cat but the /etc/sgml folder is not empty, so that
you can see the warning message:
```
dpkg: warning: while removing xml-core, directory '/etc/xml' not empty so not removed
```

The warning message looks correct to me.

Best regards,

#990191#25
Date:
2026-05-06 23:49:40 UTC
From:
To:
Hey.

Well it was /etc/xml, but at least currently, this is also "owned" by
multiple packages.

Still I thought dpkg wouldn't print such an error if other (installed)
packages still contain the file? Otherwise we'd see it all the time,
when removing any package (e.g. nearly all should contain
/usr/share/doc)

So I'd have blindly assumed that it prints the warning only *if* the
removed package was really the last (current) owner of it, but the dir
wasn't empty.


Nevertheless, feel free to close the bug.

Cheers,
Chris.

#990191#30
Date:
2026-05-07 09:39:57 UTC
From:
To:
Hi,

I confirm that this warning is happening.  However, its not really
affecting the package in any way so I reduce the severity from
normal to minor.

Kind regards
    Andreas.