When trying to unininstall cups from a linux machine some kind of "schrödingers file" was left behind: ls shows it, but otherwise its not there. System is ubuntu 17.10 / kernel 4.13, filesystem is BTRFS raid1 on 2 devices. Here's a shell snippet showing the problem:
root@kiney-desktop /root $ apt-get purge cups-daemon -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libarmadillo6 libdap17v5 libgdal1i libhdf5-10 liblwgeom-2.1.8 libossp-uuid16 libpoppler58 libproj9 libsane-hpaio libsuperlu4 python3-reportlab python3-reportlab-accel
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
cups-daemon*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 965513 files and directories currently installed.)
Purging configuration files for cups-daemon (2.2.4-7ubuntu3.1) ...
rm: cannot remove '/var/cache/cups': Directory not empty
dpkg: error processing package cups-daemon (--purge):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
cups-daemon
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@kiney-desktop /root $ cd /var/cache/cups/
root@kiney-desktop /var/cache/cups $ ls -lsha
ls: cannot access 'job.cache': No such file or directory
total 0
0 drwxrwx--- 1 root lp 18 Aug 14 19:39 .
0 drwxr-xr-x 1 root root 514 Jan 26 2018 ..
? -????????? ? ? ? ? ? job.cache
root@kiney-desktop /var/cache/cups $ rm job.cache
rm: cannot remove 'job.cache': No such file or directory
root@kiney-desktop /var/cache/cups $ stat job.cache
stat: cannot stat 'job.cache': No such file or directory
"ls" on /var/cache/cups shows a file job.cache but no further info, just question marks. I cant delete or stat the file. I have readonly BTRFS snapshots of the filesystem from before trying to remove cups, they show the file the same way. So what's going on here? Is this a bug?