lftp: recursively delete a non-empty directory

The base lftp command for this is:

lftp -r dirname

But if the directory contains hidden files it will fail stating:

rm: Access failed: 550 dirname: Directory not empty

The solution is to set the following after logging in:

set ftp:list-options -a

Now recursive delete will work.