You should not unload modules that are part of the application (anything under
resource://app/) as these may be in use by other extensions and the application. Only unload modules you include as part of your extension.
Components.utils.unload( url );
- The "resource://" URL of the script to unload. This must be the same URL that was used to load the script.
You can unload a module called MyModule.jsm using the following line of code: