First you have to cut off the old one with a utility knife (be careful the edge of the glass is sharp) then scrape off all the old silicone ( take the blade out of the knife for this or buy a glass scraper) then you have to clean all trace of old silicone off using alcohol.
The instructions on the "Aquarium Sealant" ( from
LFS or online ) Dome Depot might have a silicone that will work but it must say for aquarium use ( usually in the small print on the back ) Don't use regular Silicone. Run a bead of "Aquarium Sealant" in the chanel of the trim cap about 1/4" thick then apply trim to top of tank making sure to push it on all the way os its sits flat.