Last active
August 29, 2015 14:13
-
-
Save rwanyoike/b118fccd8b760557ece9 to your computer and use it in GitHub Desktop.
Identify files not owned by any package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$ | |
db=$tmp/db | |
fs=$tmp/fs | |
mkdir "$tmp" | |
trap 'rm -rf "$tmp"' EXIT | |
pacman -Qlq | sort -u > "$db" | |
find /etc /opt /usr ! -name lost+found \( -type d -printf '%p/\n' -o -print \) | sort > "$fs" | |
comm -23 "$fs" "$db" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment