I am running lftp on RaspbianI have 100GB of content on the remote site and 100GB space available on my SD card so I need to delete files not present at the remote site from the SD card before downloading new content.How can I achieve this?#!/bin/bashlogin=usernamepass=passwordhost=server.feralhosting.comremote_dir=/folder/you/want/to/copylocal_dir=/cygdrive/s/lftp/somefolder/where/you.want/your/files/base_name=$(basename $0)lock_file='/tmp/'$base_name'.lock'trap 'rm -f '$lock_file'' SIGINT SIGTERMif [[ -e $lock_file ]]then  echo $base_name is running already.  exit 1else  touch $lock_file  lftp -u $login,$pass $host << EOF  set ftp:ssl-allow no  set mirror:use-pget-n 5  mirror -c -P5 --log='/var/log/'$base_name'.log' $remote_dir $local_dir  quitEOF  rm -f $lock_file  trap - SIGINT SIGTERM  exit 0fi
How to use lftp to delete old files before downloading new?
raspbian;lftp