ssh host 'ls -1t /home/app/'${var}'/*.log | tail -n +2 | xargs rm -f'

とか