Generally you should have a reason for the expiry - are you seeking how to manually run a clean to remove expired tapes? That is one issue.
If you are needing to expire tapes before they are scheduled to expire, that is a whole other issue - why? Do you need to modify your retentions?
If you have a group of tapes based on a specific value - like policy/schedule or retention or backup type, etc. There are options with the bpimagelist and bpexpdate that allow you to run simple scripts to expire the tapes. Generally it requires a two step process - determine the media ID, then bpexpdate that media.
PLEASE PLEASE PLASE - measure twice and cut once. Please verify these tapes do not have valued data, because once they are expired, it is arduous to recover.
Here are some sample logic loops you can run in unix
This uses date start and end ranges (-d and -e) client (-client) as well as schedule (-sl) - I updated the retention of copy 2 to retention 23, and recalculated the expiration date.
for i in `bpimagelist -idonly -d '01/01/2013' -e '03/13/2015' -client CLIENTNAME -sl SCHEDULENAME | cut -d " " -f10`
do
echo "Changing Backup ID: "$i at `date +%Y%m%d.%H%M`
/usr/openv/netbackup/bin/admincmd/bpexpdate -recalculate -backupid $i -copy 2 -ret 23 -force
done
If you want to set a date, use /usr/openv/netbackup/bin/admincmd/bpexpdate -d "08/26/2026 00:00" -backupid $i -copy 2 -force
It won't let you set a date in the past, but you can set it for a few minutes from now, and then run the clean up afterwards.