Skip to content

Instantly share code, notes, and snippets.

@neuro-sys
Created November 28, 2011 11:28
Show Gist options
  • Save neuro-sys/1400065 to your computer and use it in GitHub Desktop.
Save neuro-sys/1400065 to your computer and use it in GitHub Desktop.
pacman disowned
#!/bin/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 /bin /etc /lib /sbin /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