dirty-helpers/saubermann-rpm

35 lines
1.1 KiB
Text
Raw Normal View History

2016-09-11 17:14:18 +02:00
#!/bin/sh
# check for things not installed via RPM and other junk
`dirname $0`/saubermann-common
2016-09-11 17:14:18 +02:00
echo "== should be installed via RPM or pip install --user:"
for site_packages in /usr/lib/python*/site-packages/; do
2017-11-11 06:37:26 +01:00
find $site_packages \( -name "*.egg-info" -or -name "*.dist-info" \) -exec rpm -qf {} \; 2>&1 | grep "not owned"
2016-09-11 17:14:18 +02:00
done
echo "== /usr/local"
find /usr/local/ -type f \
-and -not -name mimeinfo.cache \
-and -not -name defaults.list \
-print0 | xargs -0 rpm -qf 2>&1 | grep "not owned"
echo "== /usr/bin etc."
find /usr/bin /usr/sbin /usr/lib -type f \
\( \
-path '/usr/lib/modules/*/modules.*' -prune \
-or -path '*/__pycache__/*.py?' -prune \
-or -path '/usr/lib/fontconfig/cache/*' -prune \
-or -path '/usr/lib/jvm/*/*policy.jar' -prune \
-or -path '/usr/lib/modules/*/extra/*.ko' -prune \
2016-09-11 17:14:18 +02:00
-or -print0 \
\) | xargs -0 rpm -qf 2>&1 | grep "not owned"
echo "== *.rpmnew etc."
find /etc/ /usr/ \
-path '/usr/share/eclipse/dropins' -prune \
-or -name "*.rpm*" -and -not -name "*.rpm"
echo "== Orphan packages according to dnf"
2017-11-12 12:34:50 +01:00
dnf -q repoquery --extras