Hello, Ben.
One possible solution would be configure the tool to first execute a cart reset on the user’s cart each time which would set the Browser back to its default state before loading up a new set of custom tracks. This would be considered something of an extreme solution.
I think a better option would be to dynamically generate track hubs rather than custom tracks. You could then use the hubClear feature to clear old hubs when loading new ones. This process is documented at https://genome.ucsc.edu/goldenPath/help/hgTrackHubHelp.html#Session. If you are unfamiliar with track hubs, you should definitely read through the track hub help doc at https://genome.ucsc.edu/goldenPath/help/hgTrackHubHelp.html.
Please contact us again at gen...@soe.ucsc.edu if you have any further questions. All messages sent to that address are archived on a publicly-accessible Google Groups forum. If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.
---
Steve Heitner
UCSC Genome Bioinformatics Group
--