Many directories without owning packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I was surprised to see /usr/share/texlive on my system although I
remembered very well removing it months ago. It turned out to be
caused by two rpmsave files, although some *empty* directories weren't
removed:

$ find /usr/share/texlive/
/usr/share/texlive/
/usr/share/texlive/texmf-dist
/usr/share/texlive/texmf-dist/web2c
/usr/share/texlive/texmf-dist/web2c/fmtutil.cnf.rpmsave
/usr/share/texlive/texmf-dist/web2c/updmap.cfg.rpmsave
/usr/share/texlive/texmf-dist/tex
/usr/share/texlive/texmf-dist/tex/latex
/usr/share/texlive/texmf-dist/tex/latex/misc
/usr/share/texlive/tlpkg
/usr/share/texlive/tlpkg/TeXLive
/usr/share/texlive/tlpkg/tlpostcode
/usr/share/texlive/tlpkg/translations

But then I decided to check my whole /usr tree and found more orphans
than I expected.

My crude data gathering:

$ find /usr/ -type d -exec rpm -qf {} \; |
grep 'not owned' |
tee not_owned.txt

And the results on my current fc24 laptop:

$ wc -l <not_owned.txt
828

$ sort not_owned.txt | awk '{print $2}' | head
/usr/include/at-spi2-atk/2.0
/usr/include/at-spi2-atk
/usr/include/mono-2.0
/usr/include/mono-2.0/mono/cil
/usr/include/mono-2.0/mono
/usr/include/mono-2.0/mono/jit
/usr/include/mono-2.0/mono/metadata
/usr/include/mono-2.0/mono/utils
/usr/include/nss3/templates
/usr/lib64/akonadi/contact/editorpageplugins

Most directories contain files that are owned by packages, although I
could find an interesting number of actual orphan files on my /usr
tree! Upon quick inspection it looks like remains from old packages
after they got upgraded. Some of the remains date fc22. There's an
insignificant bunch of files I installed in /usr/local too.

$ find $(awk '{print $2}' <not_owned.txt) -type f |
grep -v ' ' | # I don't want to deal with spaces in file names
xargs rpm -qf |
grep 'not owned' |
wc -l
find: ‘/usr/lost+found’: Permission denied
find: ‘/usr/share/rhel/secrets’: Permission denied
1191

Sparing you more shell soup, under /usr I currently have 10738 files
owned by a package whose parent directories are *not all* owned,
belonging to 290 packages.

Once my /usr is clean I will try to monitor it after each upgrade. It
should be easy enough to script, although scanning 18GB of /usr
against the whole RPM database takes some time.

I don't know whether we have tools checking this automatically, and if
DNF/RPM tells you about paths that weren't removed along with their
packages during a transaction, I'm interested in having this
information on every `dnf update`.

Cheers,
Dridi
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux