Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 30 lines (24 sloc) 873 Bytes
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root:" 1>&2
echo "" 1>&2
echo "sudo /usr/local/bin/opensc-uninstall" 1>&2
exit 1
# Remove symlinks to commands
for file in /Library/OpenSC/bin/*; do
test -L "/usr/local/bin/$(basename $file)" && rm -f "/usr/local/bin/$(basename $file)"
# Remove symlink for pkcs11
test -L /usr/lib/ && rm -f /usr/lib/
# Remove installed files
rm -rf /Library/OpenSC
rm -rf /Library/Security/tokend/OpenSC.tokend
rm -rf /System/Library/Security/tokend/OpenSC.tokend
# delete receipts on 10.6+
for file in /var/db/receipts/ /var/db/receipts/org.opensc-project.mac.plist; do
test -f $file && rm -f $file
# remove this script
rm -f /usr/local/bin/opensc-uninstall
echo "OpenSC has been removed from your system. See you again!"
Something went wrong with that request. Please try again.