Method offered by Michael_Clarke works very well.
Issue command show licenses and look which one you need to remove.
Fore example you have 3 of them and 2nd one (temporary and expired) need to be deleted
export licenses to file in flash with command:
license export <filename>
copy that file to TFTP:
copy flash: <filename> tftp: <IP address of TFTP server> <filename>
all licenses in that file would be visible (no encryption)
For example: last and only section of the file that need to be edited looks like this:
===========================================
#
# Dumping data for table 'licenseinfo_new'
#
LOCK TABLES licenseinfo_new WRITE;
INSERT INTO licenseinfo_new VALUES (1,'<key #1>','<some hash>','','0','1','1','0'),(2,'<key #2>','<some hash>','','0','0','2','0'),(3,'<key #3>','<some hash>','','0','1','1','0');
UNLOCK TABLES;
================================================
Here I replaced actual keys with key #1, #2 and #3.
Remove portion:
(2,'<key #2>','<some hash>','','0','0','2','0'),
Renumber 3rd key to 2:
(2,'<key #3>','<some hash>','','0','1','1','0');
Save file and copy it back to flash.
copy tftp: <IP address of TFTP server> <filename> flash: <filename>
Issue command:
license import <filename>
All done !
Limitations: It can be done on early OS versions, like 6.4.
On new systems with Mobility Master license file exported encrypted and it makes almost impossible edit it.
Good luck. :-)