how to remove js after change menu context

Hi I working on a Custom library js in vaadin 8/7 and for load js on context, I am using class Abstract JavaScript with annotation @JavaScript, but i need remove js after change menu context. Its possible ? is any method to remove the scripts by name ?

thanks for any help

I load javascript with this code

@StyleSheet({“templateMaker/css/bootstrap.min.css”, “templateMaker/css/postercloudpromo.css”})

@JavaScript({“DgoTemplateConnectorJsHelper.js”,
“templateMaker/dist/jquery-3.3.1.min.js”,
“templateMaker/dist/webfont.min.js”,
“templateMaker/dist/fabric.min.js”,
“templateMaker/dist/jspdf.min.js”,
“templateMaker/dist/JsBarcode.all.min.js”,
“templateMaker/dist/qrcode/qrious.min.js”,
“templateMaker/dist/fontFaceObserver.min.js”,
“templateMaker/js/generatebarcodes.js”,
“templateMaker/dist/popper/popper.min.js”,
“templateMaker/dist/jscolor.js”,
“templateMaker/js/controller.js”})

/**
class for communication between js and java,
@StyleSheet
@JavaScript js libraries*/
public class DgoTemplateConnectorJsHelper extends AbstractJavaScriptComponent {