delete old files linux

Shell
find /opt/backup -type f -mtime +30 -exec rm -f {} \;

Source

Also in Shell: