Delete all sub-directories except one

Bash has extended globbing (first test, then remove the echo):

shopt -s extglob
echo rm -rf !(A)

find -maxdepth 1 -type d -not -name A -not -name "." -exec rm -ir {} \;