My backups are stored on remote FTP server. I'm looking for a universal way to clean-up the FTP directory using bash or python.
Any help would be appreciated.
Edited: I have only FTP access to the server.
I need to cleanup the directory via remotely logging in via FTP
You need to provide more information to get meaningful help.
At least:
That said, some pointers:
logrotate
(standard Linux utiliy) to rotate & delete old backups.