code: function() {
          var assetKey, newEntry, oldEntry;
  
          // Reuse existing metadata.
          for ( assetKey in oldAvailableLists ) {
              oldEntry = oldAvailableLists[assetKey];
              newEntry = newAvailableLists[assetKey];
              // List no longer exists. If a stock list, try to convert to
              // imported list if it was selected.
              if ( newEntry === undefined ) {
                  µb.removeFilterList(assetKey);
                  if ( assetKey.indexOf('://') === -1 ) {
                      customListFromStockList(assetKey);
                  }
                  continue;
              }
              if ( oldEntry.entryCount !== undefined ) {
                  newEntry.entryCount = oldEntry.entryCount;
              }
              if ( oldEntry.entryUsedCount !== undefined ) {
                  newEntry.entryUsedCount = oldEntry.entryUsedCount;
              }
              // This may happen if the list name was pulled from the list
              // content.
              // https://github.com/chrisaljoudi/uBlock/issues/982
              // There is no guarantee the title was successfully extracted from
              // the list content.
              if (
                  newEntry.title === '' &&
                  typeof oldEntry.title === 'string' &&
                  oldEntry.title !== ''
              ) {
                  newEntry.title = oldEntry.title;
              }
          }
  
          // Remove unreferenced imported filter lists.
          var dict = new Set(importedListKeys);
          for ( assetKey in newAvailableLists ) {
              newEntry = newAvailableLists[assetKey];
              if ( newEntry.submitter !== 'user' ) { continue; }
              if ( dict.has(assetKey) ) { continue; }
              delete newAvailableLists[assetKey];
              µb.assets.unregisterAssetSource(assetKey);
              µb.removeFilterList(assetKey);
          }
      }
docs: Final steps: - reuse existing list metadata if any; - unregister unreferenced imported filter lists if any.