How to unlink a sketch symbol library?

4 months ago from , Team Lead Experience Design

Hi, I want to remove a linked sketch symbol library so all my symbols from the library are in the same file as my designs.

Any ideas on how to best approach this?

7 comments

  • Hung Ashung, 3 months ago

    The follow script will unlink all imported symbols to local symbol. Backup your file, then running the script.

    var documentData = context.document.documentData();

    for (var i = 0; i < documentData.foreignSymbols().count(); i++) {

    var foreignSymbol = documentData.foreignSymbols().objectAtIndex(i);

    foreignSymbol.convertToLocalSymbolMaster();

    }

    To unlink imported symbols from a library, you can change the script like this.

    var documentData = context.document.documentData();

    for (var i = 0; i < documentData.foreignSymbols().count(); i++) {

    var foreignSymbol = documentData.foreignSymbols().objectAtIndex(i);

    // if (foreignSymbol..libraryID() == "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX") {

    if (foreignSymbol.sourceLibraryName() == "Library Name") {

    foreignSymbol.convertToLocalSymbolMaster();

    }

    }

    1 point
  • Syeef Karim, 4 months ago

    Double click on the symbol > Unlink from Library

    This will create a page called "Symbols" where it will act like a classic Symbol.

    0 points
  • Alex HoffmanAlex Hoffman, 4 months ago

    I think the answer you're looking for is here https://www.sketchapp.com/docs/libraries/library-symbols

    0 points
  • Jan SemlerJan Semler, 4 months ago

    Under Preferences > Libraries you will find a list with active Libraries. You can select or deselect them. Maybe you find your settings there.

    0 points