+db=${ZPMDB:-/var/lib/zpm/local.db}
+
+retain_old=${ZPM_KEEP_PACKAGES:-2}
+
+while getopts 'f:PcCk:' opt; do
+ case $opt in
+ f) db="$OPTARG" ;;
+ P) remove_old_packages=0 ;;
+ c) vacuum=1 ;;
+ C) unreferenced_file_content=0 ;;
+ k) retain_old="$OPTARG" ;;
+ esac
+done
+
+retain_old=$((retain_old + 0))
+if [ $retain_old -le 0 ]; then
+ retain_old=0
+fi