<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <link:roleRef roleURI="http://www.sanmina.com/role/AccountingPoliciesPolicies" xlink:href="sanm-20191228.xsd#AccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheets" xlink:href="sanm-20191228.xsd#CondensedConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheetsParentheticals" xlink:href="sanm-20191228.xsd#CondensedConsolidatedBalanceSheetsParentheticals" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementOfComprehensiveIncome" xlink:href="sanm-20191228.xsd#CondensedConsolidatedStatementOfComprehensiveIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:href="sanm-20191228.xsd#CondensedConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfIncome" xlink:href="sanm-20191228.xsd#CondensedConsolidatedStatementsOfIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:href="sanm-20191228.xsd#CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/DocumentAndEntityInformationDocument" xlink:href="sanm-20191228.xsd#DocumentAndEntityInformationDocument" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note10IncomeTax" xlink:href="sanm-20191228.xsd#Note10IncomeTax" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note10IncomeTaxDetails" xlink:href="sanm-20191228.xsd#Note10IncomeTaxDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11DerivativesDetails" xlink:href="sanm-20191228.xsd#Note11DerivativesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11StockRepurchaseDetails" xlink:href="sanm-20191228.xsd#Note11StockRepurchaseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11StockholdersEquity" xlink:href="sanm-20191228.xsd#Note11StockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11StockholdersEquityDetails" xlink:href="sanm-20191228.xsd#Note11StockholdersEquityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11StockholdersEquityTables" xlink:href="sanm-20191228.xsd#Note11StockholdersEquityTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformation" xlink:href="sanm-20191228.xsd#Note12BusinessSegmentGeographicAndCustomerInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformationTables" xlink:href="sanm-20191228.xsd#Note12BusinessSegmentGeographicAndCustomerInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12RevenueAndGrossProfitBySegmentDetails" xlink:href="sanm-20191228.xsd#Note12RevenueAndGrossProfitBySegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12SegmentReportingByGeographicSegmentDetails" xlink:href="sanm-20191228.xsd#Note12SegmentReportingByGeographicSegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13EarningsPerShare" xlink:href="sanm-20191228.xsd#Note13EarningsPerShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13EarningsPerShareDetails" xlink:href="sanm-20191228.xsd#Note13EarningsPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13EarningsPerShareTables" xlink:href="sanm-20191228.xsd#Note13EarningsPerShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14AdditionalInformationDetails" xlink:href="sanm-20191228.xsd#Note14AdditionalInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14RestrictedStockRollforwardDetails" xlink:href="sanm-20191228.xsd#Note14RestrictedStockRollforwardDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14ShareBasedCompensationArrangementsDetails" xlink:href="sanm-20191228.xsd#Note14ShareBasedCompensationArrangementsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:href="sanm-20191228.xsd#Note14SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14StockBasedCompensation" xlink:href="sanm-20191228.xsd#Note14StockBasedCompensation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14StockBasedCompensationTables" xlink:href="sanm-20191228.xsd#Note14StockBasedCompensationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note14UnrecognizedStockBasedCompensationExpenseDetails" xlink:href="sanm-20191228.xsd#Note14UnrecognizedStockBasedCompensationExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note1BasisOfPresentation" xlink:href="sanm-20191228.xsd#Note1BasisOfPresentation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note1BasisOfPresentationDetails" xlink:href="sanm-20191228.xsd#Note1BasisOfPresentationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2Inventories" xlink:href="sanm-20191228.xsd#Note2Inventories" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2InventoriesDetails" xlink:href="sanm-20191228.xsd#Note2InventoriesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2InventoriesTables" xlink:href="sanm-20191228.xsd#Note2InventoriesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3DisagregationOfRevenueDetails" xlink:href="sanm-20191228.xsd#Note3DisagregationOfRevenueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3RevenueRecognition" xlink:href="sanm-20191228.xsd#Note3RevenueRecognition" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3RevenueRecognitionTables" xlink:href="sanm-20191228.xsd#Note3RevenueRecognitionTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4DerivativeFinancialInstrumentsTables" xlink:href="sanm-20191228.xsd#Note4DerivativeFinancialInstrumentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4DerivativesDetails" xlink:href="sanm-20191228.xsd#Note4DerivativesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4FairValueDetails" xlink:href="sanm-20191228.xsd#Note4FairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4FinancialInstruments" xlink:href="sanm-20191228.xsd#Note4FinancialInstruments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5Debt" xlink:href="sanm-20191228.xsd#Note5Debt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5DebtScheduleDetails" xlink:href="sanm-20191228.xsd#Note5DebtScheduleDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5DebtTables" xlink:href="sanm-20191228.xsd#Note5DebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5LineOfCreditFacilityDetails" xlink:href="sanm-20191228.xsd#Note5LineOfCreditFacilityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6FutureLeaseLiabilityDetails" xlink:href="sanm-20191228.xsd#Note6FutureLeaseLiabilityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6LeaseCostDetails" xlink:href="sanm-20191228.xsd#Note6LeaseCostDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6Leases" xlink:href="sanm-20191228.xsd#Note6Leases" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6LeasesDetail" xlink:href="sanm-20191228.xsd#Note6LeasesDetail" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6LeasesTables" xlink:href="sanm-20191228.xsd#Note6LeasesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6LesseeLeaseDescriptionDetails" xlink:href="sanm-20191228.xsd#Note6LesseeLeaseDescriptionDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note7AccountsReceivableSaleProgram" xlink:href="sanm-20191228.xsd#Note7AccountsReceivableSaleProgram" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note7AccountsReceivableSaleProgramDetails" xlink:href="sanm-20191228.xsd#Note7AccountsReceivableSaleProgramDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note8CommitmentsAndContingencies" xlink:href="sanm-20191228.xsd#Note8CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note8ContingenciesDetails" xlink:href="sanm-20191228.xsd#Note8ContingenciesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note9Restructuring" xlink:href="sanm-20191228.xsd#Note9Restructuring" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note9RestructuringAndRelatedActivitiesTables" xlink:href="sanm-20191228.xsd#Note9RestructuringAndRelatedActivitiesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note9RestructuringDetails" xlink:href="sanm-20191228.xsd#Note9RestructuringDetails" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/AccountingPoliciesPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_E41C96B7C12D0049B557AB904DB9754B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_857AD050228ECE4E2F8EAB904DB97C90" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_E41C96B7C12D0049B557AB904DB9754B" xlink:to="loc_us-gaap_StatementTable_857AD050228ECE4E2F8EAB904DB97C90" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_ED2B138D99D72F6477C7AB904DB95671" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_857AD050228ECE4E2F8EAB904DB97C90" xlink:to="loc_us-gaap_StatementClassOfStockAxis_ED2B138D99D72F6477C7AB904DB95671" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_7EC23AE29E2B8FDDA0ECAB904DB9369C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_ED2B138D99D72F6477C7AB904DB95671" xlink:to="loc_us-gaap_ClassOfStockDomain_7EC23AE29E2B8FDDA0ECAB904DB9369C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_7EC23AE29E2B8FDDA0ECAB904DB9369C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_ED2B138D99D72F6477C7AB904DB95671" xlink:to="loc_us-gaap_ClassOfStockDomain_7EC23AE29E2B8FDDA0ECAB904DB9369C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AssetsAbstract" xlink:label="loc_us-gaap_AssetsAbstract_2BA0722B49B0057B4A35AB904DBA406C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_E41C96B7C12D0049B557AB904DB9754B" xlink:to="loc_us-gaap_AssetsAbstract_2BA0722B49B0057B4A35AB904DBA406C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AssetsCurrentAbstract" xlink:label="loc_us-gaap_AssetsCurrentAbstract_1D6609F4DA4A26955B3FAB904DBA7FB3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_2BA0722B49B0057B4A35AB904DBA406C" xlink:to="loc_us-gaap_AssetsCurrentAbstract_1D6609F4DA4A26955B3FAB904DBA7FB3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_FF101447459E4505158BAB904DBABE07" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_1D6609F4DA4A26955B3FAB904DBA7FB3" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_FF101447459E4505158BAB904DBABE07" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccountsAndOtherReceivablesNetCurrent" xlink:label="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_3371428530950F74AA59AB904DBB2C69" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_1D6609F4DA4A26955B3FAB904DBA7FB3" xlink:to="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_3371428530950F74AA59AB904DBB2C69" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ContractWithCustomerAssetNetCurrent" xlink:label="loc_us-gaap_ContractWithCustomerAssetNetCurrent_9D811D47F51C5B38EF1FAB904DBB13F7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_1D6609F4DA4A26955B3FAB904DBA7FB3" xlink:to="loc_us-gaap_ContractWithCustomerAssetNetCurrent_9D811D47F51C5B38EF1FAB904DBB13F7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InventoryNet" xlink:label="loc_us-gaap_InventoryNet_9251E4E08D304DC86289AB904DBB0EA9" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_1D6609F4DA4A26955B3FAB904DBA7FB3" xlink:to="loc_us-gaap_InventoryNet_9251E4E08D304DC86289AB904DBB0EA9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_BB31416969B3D3A3A6ECAB904DBBEB48" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_1D6609F4DA4A26955B3FAB904DBA7FB3" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_BB31416969B3D3A3A6ECAB904DBBEB48" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AssetsCurrent" xlink:label="loc_us-gaap_AssetsCurrent_568A08D652035AA17156AB904DBBB012" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_1D6609F4DA4A26955B3FAB904DBA7FB3" xlink:to="loc_us-gaap_AssetsCurrent_568A08D652035AA17156AB904DBBB012" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_FDD1812F56BBB0B1B9C3AB904DBBC46D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_2BA0722B49B0057B4A35AB904DBA406C" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_FDD1812F56BBB0B1B9C3AB904DBBC46D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_648ECF87B284AA0A6854AB904DBB2B9A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_2BA0722B49B0057B4A35AB904DBA406C" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_648ECF87B284AA0A6854AB904DBB2B9A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherAssetsNoncurrent" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_E01F4F4908A6E65E5B04AB904DBCD5A3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_2BA0722B49B0057B4A35AB904DBA406C" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_E01F4F4908A6E65E5B04AB904DBCD5A3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_A06F51DBB3A13F9DB327AB904DBC6271" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_2BA0722B49B0057B4A35AB904DBA406C" xlink:to="loc_us-gaap_Assets_A06F51DBB3A13F9DB327AB904DBC6271" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B39508E42F1C0498572DAB904DBC2BCB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_E41C96B7C12D0049B557AB904DB9754B" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B39508E42F1C0498572DAB904DBC2BCB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesCurrentAbstract" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract_5A4BDCFF7757D6FEDE7DAB904DBCEC8F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B39508E42F1C0498572DAB904DBC2BCB" xlink:to="loc_us-gaap_LiabilitiesCurrentAbstract_5A4BDCFF7757D6FEDE7DAB904DBCEC8F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccountsPayableCurrent" xlink:label="loc_us-gaap_AccountsPayableCurrent_52F8700C28ABF0CE30C7AB904DBC4EF1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_5A4BDCFF7757D6FEDE7DAB904DBCEC8F" xlink:to="loc_us-gaap_AccountsPayableCurrent_52F8700C28ABF0CE30C7AB904DBC4EF1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherLiabilitiesCurrent" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_E3F393EFE82CDC6EB35CAB904DBD3141" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_5A4BDCFF7757D6FEDE7DAB904DBCEC8F" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_E3F393EFE82CDC6EB35CAB904DBD3141" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_A546171AC60A52610698AB904DBD7BF3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_5A4BDCFF7757D6FEDE7DAB904DBCEC8F" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_A546171AC60A52610698AB904DBD7BF3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtCurrent" xlink:label="loc_us-gaap_DebtCurrent_E7F0FBBEE5506C5297FBAB904DBDAFE9" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_5A4BDCFF7757D6FEDE7DAB904DBCEC8F" xlink:to="loc_us-gaap_DebtCurrent_E7F0FBBEE5506C5297FBAB904DBDAFE9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesCurrent" xlink:label="loc_us-gaap_LiabilitiesCurrent_15044991AACCEBD411A3AB904DBD2739" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_5A4BDCFF7757D6FEDE7DAB904DBCEC8F" xlink:to="loc_us-gaap_LiabilitiesCurrent_15044991AACCEBD411A3AB904DBD2739" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesNoncurrentAbstract" xlink:label="loc_us-gaap_LiabilitiesNoncurrentAbstract_D08ACA825F76EB314D43AB904DBD7C6B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B39508E42F1C0498572DAB904DBC2BCB" xlink:to="loc_us-gaap_LiabilitiesNoncurrentAbstract_D08ACA825F76EB314D43AB904DBD7C6B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_83A4A88D01EEC1EB3615AB904DBDA369" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesNoncurrentAbstract_D08ACA825F76EB314D43AB904DBD7C6B" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_83A4A88D01EEC1EB3615AB904DBDA369" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherLiabilitiesNoncurrent" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_486B9E146BB8B8285EAFAB904DBEF886" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesNoncurrentAbstract_D08ACA825F76EB314D43AB904DBD7C6B" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_486B9E146BB8B8285EAFAB904DBEF886" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesNoncurrent" xlink:label="loc_us-gaap_LiabilitiesNoncurrent_4A70180A276D8DE908F9AB904DBE7E20" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesNoncurrentAbstract_D08ACA825F76EB314D43AB904DBD7C6B" xlink:to="loc_us-gaap_LiabilitiesNoncurrent_4A70180A276D8DE908F9AB904DBE7E20" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="loc_us-gaap_CommitmentsAndContingencies_6A471F637B05583D9C0FAB904DBE9D62" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B39508E42F1C0498572DAB904DBC2BCB" xlink:to="loc_us-gaap_CommitmentsAndContingencies_6A471F637B05583D9C0FAB904DBE9D62" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_C2C67DEB0D7EB2A0B6C7AB904DBE1149" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B39508E42F1C0498572DAB904DBC2BCB" xlink:to="loc_us-gaap_StockholdersEquity_C2C67DEB0D7EB2A0B6C7AB904DBE1149" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_3E8911112AF15B74EBB7AB904DBE9B33" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B39508E42F1C0498572DAB904DBC2BCB" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_3E8911112AF15B74EBB7AB904DBE9B33" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheetsParentheticals" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_376295A72129B8D393B51DB4A52BE1D4" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_F44CEF653C120DC02D921DB4A52AB9DE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_376295A72129B8D393B51DB4A52BE1D4" xlink:to="loc_us-gaap_StatementTable_F44CEF653C120DC02D921DB4A52AB9DE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_StatementScenarioAxis" xlink:label="loc_srt_StatementScenarioAxis_057480613AD104787B631DB4A52A2A70" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_F44CEF653C120DC02D921DB4A52AB9DE" xlink:to="loc_srt_StatementScenarioAxis_057480613AD104787B631DB4A52A2A70" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_ScenarioUnspecifiedDomain" xlink:label="loc_srt_ScenarioUnspecifiedDomain_00D5F7CFA9FAADCCBCFC1DB4A52B0E82_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementScenarioAxis_057480613AD104787B631DB4A52A2A70" xlink:to="loc_srt_ScenarioUnspecifiedDomain_00D5F7CFA9FAADCCBCFC1DB4A52B0E82_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_ScenarioUnspecifiedDomain" xlink:label="loc_srt_ScenarioUnspecifiedDomain_00D5F7CFA9FAADCCBCFC1DB4A52B0E82" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementScenarioAxis_057480613AD104787B631DB4A52A2A70" xlink:to="loc_srt_ScenarioUnspecifiedDomain_00D5F7CFA9FAADCCBCFC1DB4A52B0E82" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent" xlink:label="loc_us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent_29D0C5776420675918A51DB4A52B1E5D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_376295A72129B8D393B51DB4A52BE1D4" xlink:to="loc_us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent_29D0C5776420675918A51DB4A52B1E5D" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementOfComprehensiveIncome" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_5C021C753205266EFFDEE914BD87E521" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_A086D5996E0AA378A5FDE914BD78706E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_5C021C753205266EFFDEE914BD87E521" xlink:to="loc_us-gaap_StatementTable_A086D5996E0AA378A5FDE914BD78706E" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationAxis" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_6E57CEEAAD7C19064841E914BD78209B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_A086D5996E0AA378A5FDE914BD78706E" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_6E57CEEAAD7C19064841E914BD78209B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_63B2CF0514E4C4E6C75FE914BD87B8C8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_6E57CEEAAD7C19064841E914BD78209B" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_63B2CF0514E4C4E6C75FE914BD87B8C8_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_63B2CF0514E4C4E6C75FE914BD87B8C8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_6E57CEEAAD7C19064841E914BD78209B" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_63B2CF0514E4C4E6C75FE914BD87B8C8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_24253F2CB3A26F3CEC17E914BD874879" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_5C021C753205266EFFDEE914BD87E521" xlink:to="loc_us-gaap_NetIncomeLoss_24253F2CB3A26F3CEC17E914BD874879" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_DA3EAB8C4F8DE87D04EBE914BD87318D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_5C021C753205266EFFDEE914BD87E521" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_DA3EAB8C4F8DE87D04EBE914BD87318D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_F1C57F216CFE593A7516E914BD87A878" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_DA3EAB8C4F8DE87D04EBE914BD87318D" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_F1C57F216CFE593A7516E914BD87A878" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract_FB445730EBF2DFE24AD7E914BD87BCBA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_DA3EAB8C4F8DE87D04EBE914BD87318D" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract_FB445730EBF2DFE24AD7E914BD87BCBA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax_D4F6A70EAB4DEA6F0E88E914BD8798EF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract_FB445730EBF2DFE24AD7E914BD87BCBA" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax_D4F6A70EAB4DEA6F0E88E914BD8798EF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax_4B274813F0B560F05FB5E914BD87EF64" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract_FB445730EBF2DFE24AD7E914BD87BCBA" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax_4B274813F0B560F05FB5E914BD87EF64" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_35E3A7B8FA21D33B7E93E914BD8714FF" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_DA3EAB8C4F8DE87D04EBE914BD87318D" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_35E3A7B8FA21D33B7E93E914BD8714FF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_0E4CAFC5CAA5DEAECD72E914BD8724C3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_35E3A7B8FA21D33B7E93E914BD8714FF" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_0E4CAFC5CAA5DEAECD72E914BD8724C3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax_FE2973ADE6A31F8AE0BBE914BD8790EF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_35E3A7B8FA21D33B7E93E914BD8714FF" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax_FE2973ADE6A31F8AE0BBE914BD8790EF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_33B66513286DBB69EE32E914BD87E176" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_DA3EAB8C4F8DE87D04EBE914BD87318D" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_33B66513286DBB69EE32E914BD87E176" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_E45E8D4E3EA7680EC536E914BD87D992" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_DA3EAB8C4F8DE87D04EBE914BD87318D" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTax_E45E8D4E3EA7680EC536E914BD87D992" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfIncome" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_416BB446632245CA2AE9E9147259990F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_StatementTable_416BB446632245CA2AE9E9147259990F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_9FDD62B9FEF27A24ABDFE9147259BB33" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_416BB446632245CA2AE9E9147259990F" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_9FDD62B9FEF27A24ABDFE9147259BB33" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_9FF27319D67D0964B548E9147269E6F0_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_9FDD62B9FEF27A24ABDFE9147259BB33" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_9FF27319D67D0964B548E9147269E6F0_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_9FF27319D67D0964B548E9147269E6F0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_9FDD62B9FEF27A24ABDFE9147259BB33" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_9FF27319D67D0964B548E9147269E6F0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_D1EEF1A3BCA642D089CCE9147269203F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_Revenues_D1EEF1A3BCA642D089CCE9147269203F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CostOfGoodsAndServicesSold" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_EEF314458C5DF353D345E9147269D022" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_EEF314458C5DF353D345E9147269D022" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_GrossProfit" xlink:label="loc_us-gaap_GrossProfit_83288E13AA32D4C5ED17E91472693707" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_GrossProfit_83288E13AA32D4C5ED17E91472693707" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingExpensesAbstract" xlink:label="loc_us-gaap_OperatingExpensesAbstract_8B107B087FA5D0DD538CE91472696439" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_OperatingExpensesAbstract_8B107B087FA5D0DD538CE91472696439" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_BAF8E342844D0264EA11E9147269CD35" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingExpensesAbstract_8B107B087FA5D0DD538CE91472696439" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_BAF8E342844D0264EA11E9147269CD35" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ResearchAndDevelopmentExpense" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_8C2CEE865F2237D21192E914726951F6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingExpensesAbstract_8B107B087FA5D0DD538CE91472696439" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_8C2CEE865F2237D21192E914726951F6" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_RestructuringandOtherOperatingExpense" xlink:label="loc_sanm_RestructuringandOtherOperatingExpense_15C958462654E1A39DBEE91472690775" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingExpensesAbstract_8B107B087FA5D0DD538CE91472696439" xlink:to="loc_sanm_RestructuringandOtherOperatingExpense_15C958462654E1A39DBEE91472690775" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingExpenses" xlink:label="loc_us-gaap_OperatingExpenses_0A1A69A10B6BA6D4B4EFE91472691BD8" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_OperatingExpenses_0A1A69A10B6BA6D4B4EFE91472691BD8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_6BC058F93D871891F313E9147269767B" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_OperatingIncomeLoss_6BC058F93D871891F313E9147269767B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestAndOtherIncome" xlink:label="loc_us-gaap_InterestAndOtherIncome_C293153138D4440E5CF6E9147269B244" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_InterestAndOtherIncome_C293153138D4440E5CF6E9147269B244" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestExpense" xlink:label="loc_us-gaap_InterestExpense_7B202A41ACFD262FAA6EE91472691C39" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_InterestExpense_7B202A41ACFD262FAA6EE91472691C39" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_F4E68F6FBB508FA9E75EE914726991FD" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_F4E68F6FBB508FA9E75EE914726991FD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NonoperatingIncomeExpense" xlink:label="loc_us-gaap_NonoperatingIncomeExpense_2F11A9C85A2A7820FE6EE91472698F14" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_NonoperatingIncomeExpense_2F11A9C85A2A7820FE6EE91472698F14" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_2BE4F0CD1BE052519E36E9147269E976" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_2BE4F0CD1BE052519E36E9147269E976" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_17BF5F2987EDEA8ECB6EE9147269128D" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_17BF5F2987EDEA8ECB6EE9147269128D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_D9EB747899BBC48E1C2AE91472693EA3" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_NetIncomeLoss_D9EB747899BBC48E1C2AE91472693EA3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EarningsPerShareAbstract" xlink:label="loc_us-gaap_EarningsPerShareAbstract_E4F4BC82FEA108BE4DFDE914726980BB" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_EarningsPerShareAbstract_E4F4BC82FEA108BE4DFDE914726980BB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EarningsPerShareBasic" xlink:label="loc_us-gaap_EarningsPerShareBasic_DAF5CF80F444B69999ADE91472690C9D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareAbstract_E4F4BC82FEA108BE4DFDE914726980BB" xlink:to="loc_us-gaap_EarningsPerShareBasic_DAF5CF80F444B69999ADE91472690C9D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EarningsPerShareDiluted" xlink:label="loc_us-gaap_EarningsPerShareDiluted_24C0995C81F87A29D9DFE9147269E880" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareAbstract_E4F4BC82FEA108BE4DFDE914726980BB" xlink:to="loc_us-gaap_EarningsPerShareDiluted_24C0995C81F87A29D9DFE9147269E880" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract_F9B6A56DC0D9A4C68FA8E9147269444D" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1D059EA1E81D1016298BE9147269290E" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract_F9B6A56DC0D9A4C68FA8E9147269444D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_902559EDED09615D029AE9147269B060" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract_F9B6A56DC0D9A4C68FA8E9147269444D" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_902559EDED09615D029AE9147269B060" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_E63A867A509A97CEA01DE91472694746" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract_F9B6A56DC0D9A4C68FA8E9147269444D" xlink:to="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_E63A867A509A97CEA01DE91472694746" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_621000846351EF62AE37CF8026C09E04" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_844810C72AC4617B31E8CF8026BE7791" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_621000846351EF62AE37CF8026C09E04" xlink:to="loc_us-gaap_StatementTable_844810C72AC4617B31E8CF8026BE7791" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_5E747BD299BFACD41B03CF8026BEF404" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_844810C72AC4617B31E8CF8026BE7791" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_5E747BD299BFACD41B03CF8026BEF404" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_5E747BD299BFACD41B03CF8026BEF404" xlink:to="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_5E747BD299BFACD41B03CF8026BEF404" xlink:to="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember" xlink:label="loc_us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember_E91241B783A86119BC81CF8026BFABFB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84" xlink:to="loc_us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember_E91241B783A86119BC81CF8026BFABFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TreasuryStockMember" xlink:label="loc_us-gaap_TreasuryStockMember_BA7CB3ED6E8120D20F2DCF8026BFC64C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84" xlink:to="loc_us-gaap_TreasuryStockMember_BA7CB3ED6E8120D20F2DCF8026BFC64C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_B54329DF322D073FB602CF8026BF643F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_B54329DF322D073FB602CF8026BF643F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RetainedEarningsMember" xlink:label="loc_us-gaap_RetainedEarningsMember_C69921D5BE8AF30B0046CF8026BF5D97" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84" xlink:to="loc_us-gaap_RetainedEarningsMember_C69921D5BE8AF30B0046CF8026BF5D97" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_NumberofCommonSharesMember" xlink:label="loc_sanm_NumberofCommonSharesMember_EFE498884C196F0CE2C4CF8026BF2B88" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_2DE73E5AB0243E32AF5ACF8026BEFF84" xlink:to="loc_sanm_NumberofCommonSharesMember_EFE498884C196F0CE2C4CF8026BF2B88" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_621000846351EF62AE37CF8026C09E04" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_C35D10536DCEC52E8367CF8026C0B2BB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_StockholdersEquity_C35D10536DCEC52E8367CF8026C0B2BB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CommonStockSharesOutstanding" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_C541F49F1ED1F322A8FBCF8026C03D68" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_C541F49F1ED1F322A8FBCF8026C03D68" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TreasuryStockShares" xlink:label="loc_us-gaap_TreasuryStockShares_B5066792C2662C5963ECCF8026C07D98" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_TreasuryStockShares_B5066792C2662C5963ECCF8026C07D98" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesOther" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesOther_5195517CCA129C58708ECF8026C140CC" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesOther_5195517CCA129C58708ECF8026C140CC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_C3470EAB02F54EE724E8CF8026C16B87" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_C3470EAB02F54EE724E8CF8026C16B87" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_A533E6DCA84999A34E50CF8026C1EFD3" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_A533E6DCA84999A34E50CF8026C1EFD3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TreasuryStockSharesAcquired" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_229BE9E042CF3B662F12CF8026C1B3B3" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_229BE9E042CF3B662F12CF8026C1B3B3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod" xlink:label="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_4F42CF5E1A9A9E594816CF8026C1F10F" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_4F42CF5E1A9A9E594816CF8026C1F10F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_CFF0F4CF5B0CFEF543C4CF8026C20576" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_CFF0F4CF5B0CFEF543C4CF8026C20576" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_CumulativeEffectofNewAccountingPrinciple" xlink:label="loc_sanm_CumulativeEffectofNewAccountingPrinciple_973F9B576DED602FB91DCF8026C25BE2" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_sanm_CumulativeEffectofNewAccountingPrinciple_973F9B576DED602FB91DCF8026C25BE2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_AEFC723C741199C223C1CF8026C2AF33" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_7FFBD25E8207BC66454ECF8026C03519" xlink:to="loc_us-gaap_NetIncomeLoss_AEFC723C741199C223C1CF8026C2AF33" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/DocumentAndEntityInformationDocument" xlink:type="extended">
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityInformationLineItems" xlink:label="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:type="locator" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntitiesTable" xlink:label="loc_dei_EntitiesTable_696AC5A3A0B274C6A07C1DB4A4FD12D0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntitiesTable_696AC5A3A0B274C6A07C1DB4A4FD12D0" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_2D178E3C5117883D34A61DB4A4FDD7BC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_EntitiesTable_696AC5A3A0B274C6A07C1DB4A4FD12D0" xlink:to="loc_dei_LegalEntityAxis_2D178E3C5117883D34A61DB4A4FDD7BC" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_A400DED81F2229295B471DB4A4FDF26F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_2D178E3C5117883D34A61DB4A4FDD7BC" xlink:to="loc_dei_EntityDomain_A400DED81F2229295B471DB4A4FDF26F_default" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_A400DED81F2229295B471DB4A4FDF26F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_2D178E3C5117883D34A61DB4A4FDD7BC" xlink:to="loc_dei_EntityDomain_A400DED81F2229295B471DB4A4FDF26F" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentType" xlink:label="loc_dei_DocumentType_E74EB96027F0F7951BF61DB4A4FE4E86" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_DocumentType_E74EB96027F0F7951BF61DB4A4FE4E86" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentQuarterlyReport" xlink:label="loc_dei_DocumentQuarterlyReport_82C0FB3831CEE46C0BB01DB4A4FEF9F9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_DocumentQuarterlyReport_82C0FB3831CEE46C0BB01DB4A4FEF9F9" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentPeriodEndDate" xlink:label="loc_dei_DocumentPeriodEndDate_A66A82119D3F439D3DFD1DB4A4FE57BB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_DocumentPeriodEndDate_A66A82119D3F439D3DFD1DB4A4FE57BB" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentTransitionReport" xlink:label="loc_dei_DocumentTransitionReport_05B8AD6EDC9EF14372A41DB4A4FE3151" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_DocumentTransitionReport_05B8AD6EDC9EF14372A41DB4A4FE3151" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityFileNumber" xlink:label="loc_dei_EntityFileNumber_2271DA2A122CE13B17831DB4A4FFB442" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityFileNumber_2271DA2A122CE13B17831DB4A4FFB442" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityRegistrantName" xlink:label="loc_dei_EntityRegistrantName_83E9EC366E60782D3D831DB4A4FF8DA4" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityRegistrantName_83E9EC366E60782D3D831DB4A4FF8DA4" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityIncorporationStateCountryCode" xlink:label="loc_dei_EntityIncorporationStateCountryCode_B4877D2471211CE36FDB1DB4A4FF933F" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityIncorporationStateCountryCode_B4877D2471211CE36FDB1DB4A4FF933F" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityTaxIdentificationNumber" xlink:label="loc_dei_EntityTaxIdentificationNumber_239BE4339290F54D4A421DB4A4FF4708" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityTaxIdentificationNumber_239BE4339290F54D4A421DB4A4FF4708" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityAddressAddressLine1" xlink:label="loc_dei_EntityAddressAddressLine1_58211003E365A54A31B31DB4A4FF59F1" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityAddressAddressLine1_58211003E365A54A31B31DB4A4FF59F1" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityAddressCityOrTown" xlink:label="loc_dei_EntityAddressCityOrTown_1553A1E54E42B71006741DB4A4FFE857" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityAddressCityOrTown_1553A1E54E42B71006741DB4A4FFE857" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityAddressStateOrProvince" xlink:label="loc_dei_EntityAddressStateOrProvince_D73465D1F658F8B846C81DB4A4FFEAF5" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityAddressStateOrProvince_D73465D1F658F8B846C81DB4A4FFEAF5" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityAddressPostalZipCode" xlink:label="loc_dei_EntityAddressPostalZipCode_A96B916AA7D4D95C91A81DB4A5001642" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityAddressPostalZipCode_A96B916AA7D4D95C91A81DB4A5001642" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_CityAreaCode" xlink:label="loc_dei_CityAreaCode_84A9956CBA924BC08E701DB4A5005630" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_CityAreaCode_84A9956CBA924BC08E701DB4A5005630" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_LocalPhoneNumber" xlink:label="loc_dei_LocalPhoneNumber_C27647EA380B7EC9733E1DB4A500A9C2" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_LocalPhoneNumber_C27647EA380B7EC9733E1DB4A500A9C2" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityCurrentReportingStatus" xlink:label="loc_dei_EntityCurrentReportingStatus_E51564222CC60C0AFB111DB4A5007E4F" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityCurrentReportingStatus_E51564222CC60C0AFB111DB4A5007E4F" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityInteractiveDataCurrent" xlink:label="loc_dei_EntityInteractiveDataCurrent_B8D3C0EE8DCA50775CF41DB4A50052F7" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityInteractiveDataCurrent_B8D3C0EE8DCA50775CF41DB4A50052F7" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityFilerCategory" xlink:label="loc_dei_EntityFilerCategory_BFF5445A5770FA8265531DB4A500455C" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityFilerCategory_BFF5445A5770FA8265531DB4A500455C" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityShellCompany" xlink:label="loc_dei_EntityShellCompany_7DD9C036846F00800D3D1DB4A501C9FC" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityShellCompany_7DD9C036846F00800D3D1DB4A501C9FC" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_Security12bTitle" xlink:label="loc_dei_Security12bTitle_22BF29F31EA901816FE61DB4A501E290" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_Security12bTitle_22BF29F31EA901816FE61DB4A501E290" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_TradingSymbol" xlink:label="loc_dei_TradingSymbol_4B49F13D2F5D4555BEBD1DB4A5016184" xlink:type="locator" />
    <link:definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_TradingSymbol_4B49F13D2F5D4555BEBD1DB4A5016184" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_SecurityExchangeName" xlink:label="loc_dei_SecurityExchangeName_BCBC80905D900836361C1DB4A501A67A" xlink:type="locator" />
    <link:definitionArc order="21" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_SecurityExchangeName_BCBC80905D900836361C1DB4A501A67A" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityCommonStockSharesOutstanding" xlink:label="loc_dei_EntityCommonStockSharesOutstanding_F778D4451F74141578C71DB4A501A6D6" xlink:type="locator" />
    <link:definitionArc order="22" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityCommonStockSharesOutstanding_F778D4451F74141578C71DB4A501A6D6" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityListingParValuePerShare" xlink:label="loc_dei_EntityListingParValuePerShare_0D5A83873A673AD3E7211DB4A501C8A0" xlink:type="locator" />
    <link:definitionArc order="23" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityListingParValuePerShare_0D5A83873A673AD3E7211DB4A501C8A0" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityCentralIndexKey" xlink:label="loc_dei_EntityCentralIndexKey_C937411ADF08023521661DB4A502F358" xlink:type="locator" />
    <link:definitionArc order="24" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityCentralIndexKey_C937411ADF08023521661DB4A502F358" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_AmendmentFlag" xlink:label="loc_dei_AmendmentFlag_7DDCF7E3F4D6DA5F22541DB4A502CE57" xlink:type="locator" />
    <link:definitionArc order="25" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_AmendmentFlag_7DDCF7E3F4D6DA5F22541DB4A502CE57" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentFiscalYearFocus" xlink:label="loc_dei_DocumentFiscalYearFocus_F73A4854A0B4F279DBA41DB4A502EB8F" xlink:type="locator" />
    <link:definitionArc order="26" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_DocumentFiscalYearFocus_F73A4854A0B4F279DBA41DB4A502EB8F" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentFiscalPeriodFocus" xlink:label="loc_dei_DocumentFiscalPeriodFocus_83C009CEC62D29755FBC1DB4A502B405" xlink:type="locator" />
    <link:definitionArc order="27" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_DocumentFiscalPeriodFocus_83C009CEC62D29755FBC1DB4A502B405" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_CurrentFiscalYearEndDate" xlink:label="loc_dei_CurrentFiscalYearEndDate_7AF14F732A3031E1772B1DB4A502FE62" xlink:type="locator" />
    <link:definitionArc order="28" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_CurrentFiscalYearEndDate_7AF14F732A3031E1772B1DB4A502FE62" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityEmergingGrowthCompany" xlink:label="loc_dei_EntityEmergingGrowthCompany_EC3C442F338E174C175A1DB4A5027109" xlink:type="locator" />
    <link:definitionArc order="29" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntityEmergingGrowthCompany_EC3C442F338E174C175A1DB4A5027109" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntitySmallBusiness" xlink:label="loc_dei_EntitySmallBusiness_6E65D475FA4275ED0C6A1DB4A5024087" xlink:type="locator" />
    <link:definitionArc order="30" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_E395FAD5D40DB1A054E01DB4A4FE2C13" xlink:to="loc_dei_EntitySmallBusiness_6E65D475FA4275ED0C6A1DB4A5024087" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note10IncomeTax" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note10IncomeTaxDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11DerivativesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeLineItems" xlink:label="loc_us-gaap_DerivativeLineItems_11B4B5CAE43471A82B39E94E06E3C805" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeTable" xlink:label="loc_us-gaap_DerivativeTable_44300897FC323EF76481E94E06E1D781" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_11B4B5CAE43471A82B39E94E06E3C805" xlink:to="loc_us-gaap_DerivativeTable_44300897FC323EF76481E94E06E1D781" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationAxis" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_3C1E67964F467855A6A6E94E06E1F54B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_44300897FC323EF76481E94E06E1D781" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_3C1E67964F467855A6A6E94E06E1F54B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_FEB1D9B7B7990A823550E94E06E213D3_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_3C1E67964F467855A6A6E94E06E1F54B" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_FEB1D9B7B7990A823550E94E06E213D3_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_FEB1D9B7B7990A823550E94E06E213D3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_3C1E67964F467855A6A6E94E06E1F54B" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_FEB1D9B7B7990A823550E94E06E213D3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherCurrentLiabilitiesMember" xlink:label="loc_us-gaap_OtherCurrentLiabilitiesMember_E6DBBF7B18D7CCFB9655E94E06E225FE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_FEB1D9B7B7990A823550E94E06E213D3" xlink:to="loc_us-gaap_OtherCurrentLiabilitiesMember_E6DBBF7B18D7CCFB9655E94E06E225FE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:label="loc_us-gaap_HedgingDesignationAxis_BF9E5AC60E874B310B7DE94E06E2DE00" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_44300897FC323EF76481E94E06E1D781" xlink:to="loc_us-gaap_HedgingDesignationAxis_BF9E5AC60E874B310B7DE94E06E2DE00" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_A1B78A6AB36106B426A1E94E06E296B6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_BF9E5AC60E874B310B7DE94E06E2DE00" xlink:to="loc_us-gaap_HedgingDesignationDomain_A1B78A6AB36106B426A1E94E06E296B6_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_A1B78A6AB36106B426A1E94E06E296B6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_BF9E5AC60E874B310B7DE94E06E2DE00" xlink:to="loc_us-gaap_HedgingDesignationDomain_A1B78A6AB36106B426A1E94E06E296B6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_1C85761B617B095F8CC3E94E06E3BB1F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_A1B78A6AB36106B426A1E94E06E296B6" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_1C85761B617B095F8CC3E94E06E3BB1F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_55F516AB7B7A373B53FFE94E06E36B12" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_44300897FC323EF76481E94E06E1D781" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_55F516AB7B7A373B53FFE94E06E36B12" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_330E34669D0BD1B584A3E94E06E36469_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_55F516AB7B7A373B53FFE94E06E36B12" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_330E34669D0BD1B584A3E94E06E36469_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_330E34669D0BD1B584A3E94E06E36469" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_55F516AB7B7A373B53FFE94E06E36B12" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_330E34669D0BD1B584A3E94E06E36469" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestRateSwapMember" xlink:label="loc_us-gaap_InterestRateSwapMember_33253B728163905E41BFE94E06E3B281" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_330E34669D0BD1B584A3E94E06E36469" xlink:to="loc_us-gaap_InterestRateSwapMember_33253B728163905E41BFE94E06E3B281" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeNotionalAmount" xlink:label="loc_us-gaap_DerivativeNotionalAmount_6AA3FAF02C9185639849E94E06E41A01" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_11B4B5CAE43471A82B39E94E06E3C805" xlink:to="loc_us-gaap_DerivativeNotionalAmount_6AA3FAF02C9185639849E94E06E41A01" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd" xlink:label="loc_us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd_9C71692E8C7378E9F41DE94E06E40A66" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_11B4B5CAE43471A82B39E94E06E3C805" xlink:to="loc_us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd_9C71692E8C7378E9F41DE94E06E40A66" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestRateCashFlowHedgeLiabilityAtFairValue" xlink:label="loc_us-gaap_InterestRateCashFlowHedgeLiabilityAtFairValue_BA3822BFFEDA6D5A90DDE94E06E44BA7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_11B4B5CAE43471A82B39E94E06E3C805" xlink:to="loc_us-gaap_InterestRateCashFlowHedgeLiabilityAtFairValue_BA3822BFFEDA6D5A90DDE94E06E44BA7" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11StockRepurchaseDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11StockholdersEquity" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11StockholdersEquityDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11StockholdersEquityTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note12RevenueAndGrossProfitBySegmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_10CAFF2423EA976C5805FC6F5E769EE9" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_35471E1D3620A1A6DF72FC6F5E7416B1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_10CAFF2423EA976C5805FC6F5E769EE9" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_35471E1D3620A1A6DF72FC6F5E7416B1" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_ConsolidationItemsAxis" xlink:label="loc_srt_ConsolidationItemsAxis_DFDF8B48C91409B6353CFC6F5E74F1F3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_35471E1D3620A1A6DF72FC6F5E7416B1" xlink:to="loc_srt_ConsolidationItemsAxis_DFDF8B48C91409B6353CFC6F5E74F1F3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_ConsolidationItemsDomain" xlink:label="loc_srt_ConsolidationItemsDomain_D864D500047309341167FC6F5E742855_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_DFDF8B48C91409B6353CFC6F5E74F1F3" xlink:to="loc_srt_ConsolidationItemsDomain_D864D500047309341167FC6F5E742855_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_ConsolidationItemsDomain" xlink:label="loc_srt_ConsolidationItemsDomain_D864D500047309341167FC6F5E742855" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_DFDF8B48C91409B6353CFC6F5E74F1F3" xlink:to="loc_srt_ConsolidationItemsDomain_D864D500047309341167FC6F5E742855" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_E35EAFCC257A522BFE13FC6F5E75C598" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_D864D500047309341167FC6F5E742855" xlink:to="loc_us-gaap_OperatingSegmentsMember_E35EAFCC257A522BFE13FC6F5E75C598" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IntersegmentEliminationMember" xlink:label="loc_us-gaap_IntersegmentEliminationMember_B85597F2145BF612E7A9FC6F5E75D09F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_D864D500047309341167FC6F5E742855" xlink:to="loc_us-gaap_IntersegmentEliminationMember_B85597F2145BF612E7A9FC6F5E75D09F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_MaterialReconcilingItemsMember" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_84CA9932288490D476EEFC6F5E75C946" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_D864D500047309341167FC6F5E742855" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_84CA9932288490D476EEFC6F5E75C946" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_D2726C17F74B04815694FC6F5E75B4F7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_35471E1D3620A1A6DF72FC6F5E7416B1" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_D2726C17F74B04815694FC6F5E75B4F7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_AC2A7C6D8A86158F93EAFC6F5E766655_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_D2726C17F74B04815694FC6F5E75B4F7" xlink:to="loc_us-gaap_SegmentDomain_AC2A7C6D8A86158F93EAFC6F5E766655_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_AC2A7C6D8A86158F93EAFC6F5E766655" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_D2726C17F74B04815694FC6F5E75B4F7" xlink:to="loc_us-gaap_SegmentDomain_AC2A7C6D8A86158F93EAFC6F5E766655" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_IMSMember" xlink:label="loc_sanm_IMSMember_B38E9476FCD0F781CFA8FC6F5E765959" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_AC2A7C6D8A86158F93EAFC6F5E766655" xlink:to="loc_sanm_IMSMember_B38E9476FCD0F781CFA8FC6F5E765959" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AllOtherSegmentsMember" xlink:label="loc_us-gaap_AllOtherSegmentsMember_51808D39C81AE379D70FFC6F5E7606CF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_AC2A7C6D8A86158F93EAFC6F5E766655" xlink:to="loc_us-gaap_AllOtherSegmentsMember_51808D39C81AE379D70FFC6F5E7606CF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_6E23E3745984F4A22364FC6F5E77EDB4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_10CAFF2423EA976C5805FC6F5E769EE9" xlink:to="loc_us-gaap_Revenues_6E23E3745984F4A22364FC6F5E77EDB4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_GrossProfit" xlink:label="loc_us-gaap_GrossProfit_CA5DE6E7C81746A2A3F0FC6F5E773605" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_10CAFF2423EA976C5805FC6F5E769EE9" xlink:to="loc_us-gaap_GrossProfit_CA5DE6E7C81746A2A3F0FC6F5E773605" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NumberOfReportableSegments" xlink:label="loc_us-gaap_NumberOfReportableSegments_430C62F55D489222F179FC6F5E771149" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_10CAFF2423EA976C5805FC6F5E769EE9" xlink:to="loc_us-gaap_NumberOfReportableSegments_430C62F55D489222F179FC6F5E771149" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note12SegmentReportingByGeographicSegmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" xlink:label="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_B964DCE9B03B7AB8CA56FC6F60E3FB6A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable" xlink:label="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_03946FC5B039714E8764FC6F60E19A6B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_B964DCE9B03B7AB8CA56FC6F60E3FB6A" xlink:to="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_03946FC5B039714E8764FC6F60E19A6B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_StatementGeographicalAxis" xlink:label="loc_srt_StatementGeographicalAxis_7F5CC960F0BDFE117D3AFC6F60E1452D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_03946FC5B039714E8764FC6F60E19A6B" xlink:to="loc_srt_StatementGeographicalAxis_7F5CC960F0BDFE117D3AFC6F60E1452D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_7F5CC960F0BDFE117D3AFC6F60E1452D" xlink:to="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_7F5CC960F0BDFE117D3AFC6F60E1452D" xlink:to="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_AmericasMember" xlink:label="loc_srt_AmericasMember_5FC95815395903298DD3FC6F60E2CFBB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75" xlink:to="loc_srt_AmericasMember_5FC95815395903298DD3FC6F60E2CFBB" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_US" xlink:label="loc_country_US_3D0D6ADD533DBF06E9ECFC6F60E2BE10" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75" xlink:to="loc_country_US_3D0D6ADD533DBF06E9ECFC6F60E2BE10" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_MX" xlink:label="loc_country_MX_842C1156A90EAE22596EFC6F60E250DB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75" xlink:to="loc_country_MX_842C1156A90EAE22596EFC6F60E250DB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EMEAMember" xlink:label="loc_us-gaap_EMEAMember_A4F9FB7E4C91BEBD699EFC6F60E22A65" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75" xlink:to="loc_us-gaap_EMEAMember_A4F9FB7E4C91BEBD699EFC6F60E22A65" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_AsiaPacificMember" xlink:label="loc_srt_AsiaPacificMember_FFD2329514341400D9AAFC6F60E21E90" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_9BA9A7ADA87E77FB40F2FC6F60E19F75" xlink:to="loc_srt_AsiaPacificMember_FFD2329514341400D9AAFC6F60E21E90" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_7F6EE9821880A94CCAD9FC6F60E33F08" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_B964DCE9B03B7AB8CA56FC6F60E3FB6A" xlink:to="loc_us-gaap_Revenues_7F6EE9821880A94CCAD9FC6F60E33F08" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_PercentageOfNetSalesRepresentedByTenLargestCustomers" xlink:label="loc_sanm_PercentageOfNetSalesRepresentedByTenLargestCustomers_59BB9D1413B213FEE4CEFC6F60E321B5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_B964DCE9B03B7AB8CA56FC6F60E3FB6A" xlink:to="loc_sanm_PercentageOfNetSalesRepresentedByTenLargestCustomers_59BB9D1413B213FEE4CEFC6F60E321B5" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_Numberofcustomersrepresenting10ormoreofnetsales" xlink:label="loc_sanm_Numberofcustomersrepresenting10ormoreofnetsales_6EEE42C98414DCA93336FC6F60E3A125" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_B964DCE9B03B7AB8CA56FC6F60E3FB6A" xlink:to="loc_sanm_Numberofcustomersrepresenting10ormoreofnetsales_6EEE42C98414DCA93336FC6F60E3A125" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_PercentageofNetSalestoAmericasNetSales" xlink:label="loc_sanm_PercentageofNetSalestoAmericasNetSales_789BD138A8A25CA8F303FC6F60E3E1BA" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_B964DCE9B03B7AB8CA56FC6F60E3FB6A" xlink:to="loc_sanm_PercentageofNetSalestoAmericasNetSales_789BD138A8A25CA8F303FC6F60E3E1BA" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13EarningsPerShare" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13EarningsPerShareDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13EarningsPerShareTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note14AdditionalInformationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_6F1B1CD85EDA2443356FE94E06075F36" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_13A913F0C0544F857E37E94E05FF5DF8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_6F1B1CD85EDA2443356FE94E06075F36" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_13A913F0C0544F857E37E94E05FF5DF8" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeAxis" xlink:label="loc_srt_RangeAxis_6B4D027F843ACB36992AE94E06003688" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_13A913F0C0544F857E37E94E05FF5DF8" xlink:to="loc_srt_RangeAxis_6B4D027F843ACB36992AE94E06003688" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_F6EF7CC9FA9B9EB1B3C2E94E060084AE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_6B4D027F843ACB36992AE94E06003688" xlink:to="loc_srt_RangeMember_F6EF7CC9FA9B9EB1B3C2E94E060084AE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_F6EF7CC9FA9B9EB1B3C2E94E060084AE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_6B4D027F843ACB36992AE94E06003688" xlink:to="loc_srt_RangeMember_F6EF7CC9FA9B9EB1B3C2E94E060084AE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_MinimumMember" xlink:label="loc_srt_MinimumMember_0580AD11D93B160973BBE94E0600CD3E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_F6EF7CC9FA9B9EB1B3C2E94E060084AE" xlink:to="loc_srt_MinimumMember_0580AD11D93B160973BBE94E0600CD3E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_MaximumMember" xlink:label="loc_srt_MaximumMember_3F3BF7CF5A0217C86E19E94E0601F68C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_F6EF7CC9FA9B9EB1B3C2E94E060084AE" xlink:to="loc_srt_MaximumMember_3F3BF7CF5A0217C86E19E94E0601F68C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_0183C5D4BE193CD1135FE94E06010C74" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_13A913F0C0544F857E37E94E05FF5DF8" xlink:to="loc_us-gaap_AwardTypeAxis_0183C5D4BE193CD1135FE94E06010C74" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_D48740D145DA3915A718E94E06011474_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_0183C5D4BE193CD1135FE94E06010C74" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_D48740D145DA3915A718E94E06011474_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_D48740D145DA3915A718E94E06011474" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_0183C5D4BE193CD1135FE94E06010C74" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_D48740D145DA3915A718E94E06011474" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PerformanceSharesMember" xlink:label="loc_us-gaap_PerformanceSharesMember_07F5F6D6175544E33D41E94E06011122" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_D48740D145DA3915A718E94E06011474" xlink:to="loc_us-gaap_PerformanceSharesMember_07F5F6D6175544E33D41E94E06011122" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AwardDateAxis" xlink:label="loc_us-gaap_AwardDateAxis_590AB083EB216AACF489E94E06063E0E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_13A913F0C0544F857E37E94E05FF5DF8" xlink:to="loc_us-gaap_AwardDateAxis_590AB083EB216AACF489E94E06063E0E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AwardDateDomain" xlink:label="loc_us-gaap_AwardDateDomain_34860A5DB43566272B5BE94E0607AA3D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardDateAxis_590AB083EB216AACF489E94E06063E0E" xlink:to="loc_us-gaap_AwardDateDomain_34860A5DB43566272B5BE94E0607AA3D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AwardDateDomain" xlink:label="loc_us-gaap_AwardDateDomain_34860A5DB43566272B5BE94E0607AA3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardDateAxis_590AB083EB216AACF489E94E06063E0E" xlink:to="loc_us-gaap_AwardDateDomain_34860A5DB43566272B5BE94E0607AA3D" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_Q1FY20GrantsMember" xlink:label="loc_sanm_Q1FY20GrantsMember_2760E72AD961EF8B983FE94E060718AC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AwardDateDomain_34860A5DB43566272B5BE94E0607AA3D" xlink:to="loc_sanm_Q1FY20GrantsMember_2760E72AD961EF8B983FE94E060718AC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_BE61DDAFACC6146528C9E94E0608A370" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_6F1B1CD85EDA2443356FE94E06075F36" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_BE61DDAFACC6146528C9E94E0608A370" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_3F09C722FFA156D640B4E94E06086746" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_6F1B1CD85EDA2443356FE94E06075F36" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_3F09C722FFA156D640B4E94E06086746" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_PotentialPayoutPercentage" xlink:label="loc_sanm_PotentialPayoutPercentage_C4C5BE0607D5CFD1489DE94E06084B0E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_6F1B1CD85EDA2443356FE94E06075F36" xlink:to="loc_sanm_PotentialPayoutPercentage_C4C5BE0607D5CFD1489DE94E06084B0E" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_PotentialadjustmenttoPSUs" xlink:label="loc_sanm_PotentialadjustmenttoPSUs_C03C245DAC9E7E05BEDAE94E06081920" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_6F1B1CD85EDA2443356FE94E06075F36" xlink:to="loc_sanm_PotentialadjustmenttoPSUs_C03C245DAC9E7E05BEDAE94E06081920" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardExpirationDate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardExpirationDate_33F49EF137248FCFDA77E94E0608185D" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_6F1B1CD85EDA2443356FE94E06075F36" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardExpirationDate_33F49EF137248FCFDA77E94E0608185D" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note14RestrictedStockRollforwardDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note14ShareBasedCompensationArrangementsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_A2E6EAE3A3D96B445951FC701A2D9F4A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable" xlink:label="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_15E212DC65957DC87699FC701A2BEA23" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_A2E6EAE3A3D96B445951FC701A2D9F4A" xlink:to="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_15E212DC65957DC87699FC701A2BEA23" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_0D49B2743A321FDE84F8FC701A2BADBA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_15E212DC65957DC87699FC701A2BEA23" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_0D49B2743A321FDE84F8FC701A2BADBA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_5F6EBB23421470ACF043FC701A2B16BF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_0D49B2743A321FDE84F8FC701A2BADBA" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_5F6EBB23421470ACF043FC701A2B16BF_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_5F6EBB23421470ACF043FC701A2B16BF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_0D49B2743A321FDE84F8FC701A2BADBA" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_5F6EBB23421470ACF043FC701A2B16BF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CostOfSalesMember" xlink:label="loc_us-gaap_CostOfSalesMember_320D8491AD4BD908A329FC701A2C481F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_5F6EBB23421470ACF043FC701A2B16BF" xlink:to="loc_us-gaap_CostOfSalesMember_320D8491AD4BD908A329FC701A2C481F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_740102966850D56A2F4DFC701A2CD894" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_5F6EBB23421470ACF043FC701A2B16BF" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_740102966850D56A2F4DFC701A2CD894" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ResearchAndDevelopmentExpenseMember" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpenseMember_C9E79FDB43670F327A94FC701A2CF315" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_5F6EBB23421470ACF043FC701A2B16BF" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpenseMember_C9E79FDB43670F327A94FC701A2CF315" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_1118FB2F2A7A1EACA90EFC701A2CA1BD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_15E212DC65957DC87699FC701A2BEA23" xlink:to="loc_us-gaap_AwardTypeAxis_1118FB2F2A7A1EACA90EFC701A2CA1BD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F64C07997369A4178B17FC701A2CB90C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_1118FB2F2A7A1EACA90EFC701A2CA1BD" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F64C07997369A4178B17FC701A2CB90C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F64C07997369A4178B17FC701A2CB90C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_1118FB2F2A7A1EACA90EFC701A2CA1BD" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F64C07997369A4178B17FC701A2CB90C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_34F2A9A26933FC716A7AFC701A2D83BC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F64C07997369A4178B17FC701A2CB90C" xlink:to="loc_us-gaap_EmployeeStockOptionMember_34F2A9A26933FC716A7AFC701A2D83BC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_8CD2BC858CC48D214AE1FC701A2DFE4C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F64C07997369A4178B17FC701A2CB90C" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_8CD2BC858CC48D214AE1FC701A2DFE4C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AllocatedShareBasedCompensationExpense" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_8614496F63EADB7FCCE4FC701A2DA9CB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_A2E6EAE3A3D96B445951FC701A2D9F4A" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_8614496F63EADB7FCCE4FC701A2DA9CB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_B744CD467AFF1B3A19B2FC701A2E60E3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_A2E6EAE3A3D96B445951FC701A2D9F4A" xlink:to="loc_us-gaap_ShareBasedCompensation_B744CD467AFF1B3A19B2FC701A2E60E3" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note14SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note14StockBasedCompensation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note14StockBasedCompensationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note14UnrecognizedStockBasedCompensationExpenseDetails" xlink:type="extended">
    <link:loc xlink:href="sanm-20191228.xsd#sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems" xlink:label="loc_sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems_1AC30470FFAE26D646F7FC701C620C28" xlink:type="locator" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_UnrecognizedStockBasedCompensationExpenseTable" xlink:label="loc_sanm_UnrecognizedStockBasedCompensationExpenseTable_1C987888DAE726A0FD07FC701C5B3B08" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems_1AC30470FFAE26D646F7FC701C620C28" xlink:to="loc_sanm_UnrecognizedStockBasedCompensationExpenseTable_1C987888DAE726A0FD07FC701C5B3B08" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_360AD3F02276977A5C80FC701C5C6949" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_sanm_UnrecognizedStockBasedCompensationExpenseTable_1C987888DAE726A0FD07FC701C5B3B08" xlink:to="loc_us-gaap_AwardTypeAxis_360AD3F02276977A5C80FC701C5C6949" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B229906D966CCB78C3D5FC701C5CDCDE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_360AD3F02276977A5C80FC701C5C6949" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B229906D966CCB78C3D5FC701C5CDCDE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B229906D966CCB78C3D5FC701C5CDCDE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_360AD3F02276977A5C80FC701C5C6949" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B229906D966CCB78C3D5FC701C5CDCDE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_5F07E438A3FA04DE53BAFC701C5C1DEC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B229906D966CCB78C3D5FC701C5CDCDE" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_5F07E438A3FA04DE53BAFC701C5C1DEC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_PerformanceSharesMember" xlink:label="loc_us-gaap_PerformanceSharesMember_C72C598952B121E9559FFC701C616D94" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_B229906D966CCB78C3D5FC701C5CDCDE" xlink:to="loc_us-gaap_PerformanceSharesMember_C72C598952B121E9559FFC701C616D94" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_95B4A4C569E72BC4E43DFC701C62E682" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems_1AC30470FFAE26D646F7FC701C620C28" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_95B4A4C569E72BC4E43DFC701C62E682" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_5E2CEC1795144E628DA5FC701C62D593" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems_1AC30470FFAE26D646F7FC701C620C28" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_5E2CEC1795144E628DA5FC701C62D593" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note1BasisOfPresentation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note1BasisOfPresentationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems" xlink:label="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_B1ABC6C40845026CCF2AE944BCFD442B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable" xlink:label="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_0E07D07B82361A652589E944BCFDDDE8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_B1ABC6C40845026CCF2AE944BCFD442B" xlink:to="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_0E07D07B82361A652589E944BCFDDDE8" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:label="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_3AE772E7D7BC7B865D95E944BCFD8B02" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_0E07D07B82361A652589E944BCFDDDE8" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_3AE772E7D7BC7B865D95E944BCFD8B02" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_6E8A1FCF806C07D5B0CFE944BCFD43D6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_3AE772E7D7BC7B865D95E944BCFD8B02" xlink:to="loc_us-gaap_TypeOfAdoptionMember_6E8A1FCF806C07D5B0CFE944BCFD43D6_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_6E8A1FCF806C07D5B0CFE944BCFD43D6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_3AE772E7D7BC7B865D95E944BCFD8B02" xlink:to="loc_us-gaap_TypeOfAdoptionMember_6E8A1FCF806C07D5B0CFE944BCFD43D6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccountingStandardsUpdate201602Member" xlink:label="loc_us-gaap_AccountingStandardsUpdate201602Member_A6C3DE093DF53A927B59E944BCFD9B61" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_6E8A1FCF806C07D5B0CFE944BCFD43D6" xlink:to="loc_us-gaap_AccountingStandardsUpdate201602Member_A6C3DE093DF53A927B59E944BCFD9B61" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseRightOfUseAsset" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_0DA0538ABDFA8F25A2F4E948B6BB4011" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_B1ABC6C40845026CCF2AE944BCFD442B" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_0DA0538ABDFA8F25A2F4E948B6BB4011" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseLiability" xlink:label="loc_us-gaap_OperatingLeaseLiability_EDA54B228BFC9BB5CE38E9471AB9A56D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_B1ABC6C40845026CCF2AE944BCFD442B" xlink:to="loc_us-gaap_OperatingLeaseLiability_EDA54B228BFC9BB5CE38E9471AB9A56D" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note2Inventories" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note2InventoriesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note2InventoriesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note3DisagregationOfRevenueDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DisaggregationOfRevenueLineItems" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_937B9470D05B595AB3BDE94C462868E2" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DisaggregationOfRevenueTable" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_EDB91579E38B71E3B928E94C46246614" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_937B9470D05B595AB3BDE94C462868E2" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_EDB91579E38B71E3B928E94C46246614" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_FA7E174D3D149F341727E94C4624845B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_EDB91579E38B71E3B928E94C46246614" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_FA7E174D3D149F341727E94C4624845B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_EF005992BE32FBD17E67E94C46255AF8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_FA7E174D3D149F341727E94C4624845B" xlink:to="loc_us-gaap_SegmentDomain_EF005992BE32FBD17E67E94C46255AF8_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_EF005992BE32FBD17E67E94C46255AF8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_FA7E174D3D149F341727E94C4624845B" xlink:to="loc_us-gaap_SegmentDomain_EF005992BE32FBD17E67E94C46255AF8" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_IMSThirdPartyRevenueMember" xlink:label="loc_sanm_IMSThirdPartyRevenueMember_5B2244920627F4A42C1FE94C4625B4FF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_EF005992BE32FBD17E67E94C46255AF8" xlink:to="loc_sanm_IMSThirdPartyRevenueMember_5B2244920627F4A42C1FE94C4625B4FF" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_CPSThirdPartyRevenueMember" xlink:label="loc_sanm_CPSThirdPartyRevenueMember_52167EE1CD6DE98A0D71E94C46250463" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_EF005992BE32FBD17E67E94C46255AF8" xlink:to="loc_sanm_CPSThirdPartyRevenueMember_52167EE1CD6DE98A0D71E94C46250463" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_EndMarketAxis" xlink:label="loc_sanm_EndMarketAxis_D08D662B74AD73602DCCE94C46255642" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_EDB91579E38B71E3B928E94C46246614" xlink:to="loc_sanm_EndMarketAxis_D08D662B74AD73602DCCE94C46255642" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_EndMarketDomain" xlink:label="loc_sanm_EndMarketDomain_7148F8B604B31A38A5F9E94C46260C0F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_sanm_EndMarketAxis_D08D662B74AD73602DCCE94C46255642" xlink:to="loc_sanm_EndMarketDomain_7148F8B604B31A38A5F9E94C46260C0F_default" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_EndMarketDomain" xlink:label="loc_sanm_EndMarketDomain_7148F8B604B31A38A5F9E94C46260C0F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_sanm_EndMarketAxis_D08D662B74AD73602DCCE94C46255642" xlink:to="loc_sanm_EndMarketDomain_7148F8B604B31A38A5F9E94C46260C0F" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_IndustrialMedicalAutomotiveandDefenseMember" xlink:label="loc_sanm_IndustrialMedicalAutomotiveandDefenseMember_1ABEBBAD00157F1090ADE94C4626FA53" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_EndMarketDomain_7148F8B604B31A38A5F9E94C46260C0F" xlink:to="loc_sanm_IndustrialMedicalAutomotiveandDefenseMember_1ABEBBAD00157F1090ADE94C4626FA53" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_CommunicationsNetworksMember" xlink:label="loc_sanm_CommunicationsNetworksMember_DA05628B4A1FD26B5353E94C462695CD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_EndMarketDomain_7148F8B604B31A38A5F9E94C46260C0F" xlink:to="loc_sanm_CommunicationsNetworksMember_DA05628B4A1FD26B5353E94C462695CD" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_CloudSolutionsMember" xlink:label="loc_sanm_CloudSolutionsMember_9901B1F6072499DBBE7EE94C46269796" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_EndMarketDomain_7148F8B604B31A38A5F9E94C46260C0F" xlink:to="loc_sanm_CloudSolutionsMember_9901B1F6072499DBBE7EE94C46269796" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_StatementGeographicalAxis" xlink:label="loc_srt_StatementGeographicalAxis_B470A30C0222F4747673E94C462639B1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_EDB91579E38B71E3B928E94C46246614" xlink:to="loc_srt_StatementGeographicalAxis_B470A30C0222F4747673E94C462639B1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_B470A30C0222F4747673E94C462639B1" xlink:to="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_B470A30C0222F4747673E94C462639B1" xlink:to="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_AmericasMember" xlink:label="loc_srt_AmericasMember_DF94448A293D848EA336E94C4627FC12" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D" xlink:to="loc_srt_AmericasMember_DF94448A293D848EA336E94C4627FC12" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EMEAMember" xlink:label="loc_us-gaap_EMEAMember_75A0E7C9E377F74A3BCEE94C4627ABB8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D" xlink:to="loc_us-gaap_EMEAMember_75A0E7C9E377F74A3BCEE94C4627ABB8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_AsiaPacificMember" xlink:label="loc_srt_AsiaPacificMember_A8716563D00B96257CC6E94C462791F4" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D" xlink:to="loc_srt_AsiaPacificMember_A8716563D00B96257CC6E94C462791F4" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_MX" xlink:label="loc_country_MX_72ECF94879ECE0382997E94C46286B29" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D" xlink:to="loc_country_MX_72ECF94879ECE0382997E94C46286B29" xlink:type="arc" />
    <link:loc xlink:href="https://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_US" xlink:label="loc_country_US_C080F6B93B26119CBE37E94C46283046" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_F831E413394A8D26C715E94C4627601D" xlink:to="loc_country_US_C080F6B93B26119CBE37E94C46283046" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_PercentageofNetSalestoAmericasNetSales" xlink:label="loc_sanm_PercentageofNetSalestoAmericasNetSales_4408B7F1C42A9ABA4444E94C46286967" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_937B9470D05B595AB3BDE94C462868E2" xlink:to="loc_sanm_PercentageofNetSalestoAmericasNetSales_4408B7F1C42A9ABA4444E94C46286967" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_DF97D911E4C6C03C7CD2E94C462832F6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_937B9470D05B595AB3BDE94C462868E2" xlink:to="loc_us-gaap_Revenues_DF97D911E4C6C03C7CD2E94C462832F6" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_PercentofNetSalesTransferredOverTime" xlink:label="loc_sanm_PercentofNetSalesTransferredOverTime_E770F274C4E940C8A5A3E94C46289C91" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_937B9470D05B595AB3BDE94C462868E2" xlink:to="loc_sanm_PercentofNetSalesTransferredOverTime_E770F274C4E940C8A5A3E94C46289C91" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note3RevenueRecognition" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note3RevenueRecognitionTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note4DerivativeFinancialInstrumentsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note4DerivativesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeLineItems" xlink:label="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeTable" xlink:label="loc_us-gaap_DerivativeTable_2DD62DE939C1B0C1126EE9905221976A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:to="loc_us-gaap_DerivativeTable_2DD62DE939C1B0C1126EE9905221976A" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationAxis" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_9C50BEF29DA62D7405EDE99052291E48" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_2DD62DE939C1B0C1126EE9905221976A" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_9C50BEF29DA62D7405EDE99052291E48" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_3FD07BAFEFC7EC2B8633E9905229EBA8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_9C50BEF29DA62D7405EDE99052291E48" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_3FD07BAFEFC7EC2B8633E9905229EBA8_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_3FD07BAFEFC7EC2B8633E9905229EBA8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_9C50BEF29DA62D7405EDE99052291E48" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_3FD07BAFEFC7EC2B8633E9905229EBA8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherCurrentLiabilitiesMember" xlink:label="loc_us-gaap_OtherCurrentLiabilitiesMember_893ECB11AE8CB27102DCE990522ACF32" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_3FD07BAFEFC7EC2B8633E9905229EBA8" xlink:to="loc_us-gaap_OtherCurrentLiabilitiesMember_893ECB11AE8CB27102DCE990522ACF32" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:label="loc_us-gaap_HedgingDesignationAxis_B1BCF60BBBBB0D5B39BEE990522CE5A5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_2DD62DE939C1B0C1126EE9905221976A" xlink:to="loc_us-gaap_HedgingDesignationAxis_B1BCF60BBBBB0D5B39BEE990522CE5A5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_5B3228E80C3C71F9DE58E990522C7B30_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_B1BCF60BBBBB0D5B39BEE990522CE5A5" xlink:to="loc_us-gaap_HedgingDesignationDomain_5B3228E80C3C71F9DE58E990522C7B30_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_5B3228E80C3C71F9DE58E990522C7B30" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_B1BCF60BBBBB0D5B39BEE990522CE5A5" xlink:to="loc_us-gaap_HedgingDesignationDomain_5B3228E80C3C71F9DE58E990522C7B30" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_D116B99C717FEB89E190E990522CE646" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_5B3228E80C3C71F9DE58E990522C7B30" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_D116B99C717FEB89E190E990522CE646" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NondesignatedMember" xlink:label="loc_us-gaap_NondesignatedMember_3544125B1D2A42EA743EE990523B1300" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_5B3228E80C3C71F9DE58E990522C7B30" xlink:to="loc_us-gaap_NondesignatedMember_3544125B1D2A42EA743EE990523B1300" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_0802ACF1C137C952BE73E990523B9D38" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_2DD62DE939C1B0C1126EE9905221976A" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_0802ACF1C137C952BE73E990523B9D38" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_731CAD76B61E1BC13850E990523B8EFE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_0802ACF1C137C952BE73E990523B9D38" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_731CAD76B61E1BC13850E990523B8EFE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_731CAD76B61E1BC13850E990523B8EFE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_0802ACF1C137C952BE73E990523B9D38" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_731CAD76B61E1BC13850E990523B8EFE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ForeignExchangeForwardMember" xlink:label="loc_us-gaap_ForeignExchangeForwardMember_1875CDF26219C3F239B6E990523C6EE6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_731CAD76B61E1BC13850E990523B8EFE" xlink:to="loc_us-gaap_ForeignExchangeForwardMember_1875CDF26219C3F239B6E990523C6EE6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestRateSwapMember" xlink:label="loc_us-gaap_InterestRateSwapMember_24E148ADDEF5B386F6EEE990523C4563" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_731CAD76B61E1BC13850E990523B8EFE" xlink:to="loc_us-gaap_InterestRateSwapMember_24E148ADDEF5B386F6EEE990523C4563" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_NumberOfForeignCurrencyDerivativesHeld" xlink:label="loc_us-gaap_NumberOfForeignCurrencyDerivativesHeld_32521AF088843A6A7F10E990523C5D0D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:to="loc_us-gaap_NumberOfForeignCurrencyDerivativesHeld_32521AF088843A6A7F10E990523C5D0D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_MaximumRemainingMaturityOfForeignCurrencyDerivatives1" xlink:label="loc_us-gaap_MaximumRemainingMaturityOfForeignCurrencyDerivatives1_41AF8135F80556273938E990523C010C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:to="loc_us-gaap_MaximumRemainingMaturityOfForeignCurrencyDerivatives1_41AF8135F80556273938E990523C010C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_MaximumLengthOfTimeForeignCurrencyCashFlowHedge" xlink:label="loc_us-gaap_MaximumLengthOfTimeForeignCurrencyCashFlowHedge_F00A540882F11A78121BE990523DA495" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:to="loc_us-gaap_MaximumLengthOfTimeForeignCurrencyCashFlowHedge_F00A540882F11A78121BE990523DA495" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeMaturityDates" xlink:label="loc_us-gaap_DerivativeMaturityDates_D5CD59F17FD679E7299AE990523D717F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:to="loc_us-gaap_DerivativeMaturityDates_D5CD59F17FD679E7299AE990523D717F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DerivativeNotionalAmount" xlink:label="loc_us-gaap_DerivativeNotionalAmount_C17CB953E7F1FBA8568EE990523D7014" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:to="loc_us-gaap_DerivativeNotionalAmount_C17CB953E7F1FBA8568EE990523D7014" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd" xlink:label="loc_us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd_F1C11DA52376804D6BE3E990523DBB96" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:to="loc_us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd_F1C11DA52376804D6BE3E990523DBB96" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_InterestRateCashFlowHedgeLiabilityAtFairValue" xlink:label="loc_us-gaap_InterestRateCashFlowHedgeLiabilityAtFairValue_99166C4B66DB167C9D0BE990523D1CF1" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_2CA33A97B37F0948AC39E990523C9DE1" xlink:to="loc_us-gaap_InterestRateCashFlowHedgeLiabilityAtFairValue_99166C4B66DB167C9D0BE990523D1CF1" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note4FairValueDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note4FinancialInstruments" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note5Debt" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note5DebtScheduleDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentLineItems" xlink:label="loc_us-gaap_DebtInstrumentLineItems_E851CC86DE32549BCEF3EE041EB3B766" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentTable" xlink:label="loc_us-gaap_DebtInstrumentTable_02E05EA69FCDFF213754EE041EA892D2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E851CC86DE32549BCEF3EE041EB3B766" xlink:to="loc_us-gaap_DebtInstrumentTable_02E05EA69FCDFF213754EE041EA892D2" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_58C68E2BA97D251E988AEE041EAFF2C9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_02E05EA69FCDFF213754EE041EA892D2" xlink:to="loc_us-gaap_CreditFacilityAxis_58C68E2BA97D251E988AEE041EAFF2C9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_053BEFF0215032A8EB2EEE041EB07792_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_58C68E2BA97D251E988AEE041EAFF2C9" xlink:to="loc_us-gaap_CreditFacilityDomain_053BEFF0215032A8EB2EEE041EB07792_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_053BEFF0215032A8EB2EEE041EB07792" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_58C68E2BA97D251E988AEE041EAFF2C9" xlink:to="loc_us-gaap_CreditFacilityDomain_053BEFF0215032A8EB2EEE041EB07792" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_02B1F08E717E886451DFEE041EB27C03" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_02E05EA69FCDFF213754EE041EA892D2" xlink:to="loc_us-gaap_DebtInstrumentAxis_02B1F08E717E886451DFEE041EB27C03" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_AA40355BC01C2B00246DEE041EB2A11B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_02B1F08E717E886451DFEE041EB27C03" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_AA40355BC01C2B00246DEE041EB2A11B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_AA40355BC01C2B00246DEE041EB2A11B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_02B1F08E717E886451DFEE041EB27C03" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_AA40355BC01C2B00246DEE041EB2A11B" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_NoninterestbearingpromissorynoteMember" xlink:label="loc_sanm_NoninterestbearingpromissorynoteMember_D694863FEF85050A738AEE041EB2CB60" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_AA40355BC01C2B00246DEE041EB2A11B" xlink:to="loc_sanm_NoninterestbearingpromissorynoteMember_D694863FEF85050A738AEE041EB2CB60" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_DelayedDrawTermLoanMember" xlink:label="loc_sanm_DelayedDrawTermLoanMember_F8FE2829290A3D93AC56EE041EB3EA9E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_AA40355BC01C2B00246DEE041EB2A11B" xlink:to="loc_sanm_DelayedDrawTermLoanMember_F8FE2829290A3D93AC56EE041EB3EA9E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherNotesPayable" xlink:label="loc_us-gaap_OtherNotesPayable_F7F7A09B053C1C1D92C2EE041EB4F7F4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E851CC86DE32549BCEF3EE041EB3B766" xlink:to="loc_us-gaap_OtherNotesPayable_F7F7A09B053C1C1D92C2EE041EB4F7F4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_42F677CB44E3C0D331DDEE041EC19DE1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E851CC86DE32549BCEF3EE041EB3B766" xlink:to="loc_us-gaap_LongTermDebt_42F677CB44E3C0D331DDEE041EC19DE1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherNotesPayableCurrent" xlink:label="loc_us-gaap_OtherNotesPayableCurrent_CBCEB67CA52F599ACF4AEE041EC18CFB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E851CC86DE32549BCEF3EE041EB3B766" xlink:to="loc_us-gaap_OtherNotesPayableCurrent_CBCEB67CA52F599ACF4AEE041EC18CFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LoansPayableToBankCurrent" xlink:label="loc_us-gaap_LoansPayableToBankCurrent_D15391A8EE3D88A2093AEE041EC180C0" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E851CC86DE32549BCEF3EE041EB3B766" xlink:to="loc_us-gaap_LoansPayableToBankCurrent_D15391A8EE3D88A2093AEE041EC180C0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_FAA2DE645251DC09BBADEE041EC16E92" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E851CC86DE32549BCEF3EE041EB3B766" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_FAA2DE645251DC09BBADEE041EC16E92" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LoansPayableToBank" xlink:label="loc_us-gaap_LoansPayableToBank_2A47805DBD19A4A5D764EE041EC25ABE" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E851CC86DE32549BCEF3EE041EB3B766" xlink:to="loc_us-gaap_LoansPayableToBank_2A47805DBD19A4A5D764EE041EC25ABE" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note5DebtTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note5LineOfCreditFacilityDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_508608D53B5E1DEA4C5FEE05063BADCF" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LineOfCreditFacilityTable" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_55DA80522CC75189DB25EE05063959F1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_508608D53B5E1DEA4C5FEE05063BADCF" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_55DA80522CC75189DB25EE05063959F1" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_9CC5C44D91C7DB34CCEFEE0506398CD6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_55DA80522CC75189DB25EE05063959F1" xlink:to="loc_us-gaap_DebtInstrumentAxis_9CC5C44D91C7DB34CCEFEE0506398CD6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_4C3727B43D6B5CCE08CAEE05063915B7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_9CC5C44D91C7DB34CCEFEE0506398CD6" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_4C3727B43D6B5CCE08CAEE05063915B7_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_4C3727B43D6B5CCE08CAEE05063915B7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_9CC5C44D91C7DB34CCEFEE0506398CD6" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_4C3727B43D6B5CCE08CAEE05063915B7" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_DelayedDrawTermLoanMember" xlink:label="loc_sanm_DelayedDrawTermLoanMember_7B398DBBCCAE8DDC2631EE050639F002" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4C3727B43D6B5CCE08CAEE05063915B7" xlink:to="loc_sanm_DelayedDrawTermLoanMember_7B398DBBCCAE8DDC2631EE050639F002" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_58FFA51F9AB2A60A8E5EEE05063A0B1C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_55DA80522CC75189DB25EE05063959F1" xlink:to="loc_us-gaap_CreditFacilityAxis_58FFA51F9AB2A60A8E5EEE05063A0B1C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_FD30183081D74234BD64EE05063A0CD1_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_58FFA51F9AB2A60A8E5EEE05063A0B1C" xlink:to="loc_us-gaap_CreditFacilityDomain_FD30183081D74234BD64EE05063A0CD1_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_FD30183081D74234BD64EE05063A0CD1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_58FFA51F9AB2A60A8E5EEE05063A0B1C" xlink:to="loc_us-gaap_CreditFacilityDomain_FD30183081D74234BD64EE05063A0CD1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ForeignLineOfCreditMember" xlink:label="loc_us-gaap_ForeignLineOfCreditMember_E0FFC184A6F86D76D93BEE05063AFCDF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_FD30183081D74234BD64EE05063A0CD1" xlink:to="loc_us-gaap_ForeignLineOfCreditMember_E0FFC184A6F86D76D93BEE05063AFCDF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_6B5D8F09D0EDE2E25471EE05063B2917" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_508608D53B5E1DEA4C5FEE05063BADCF" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_6B5D8F09D0EDE2E25471EE05063B2917" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LineOfCredit" xlink:label="loc_us-gaap_LineOfCredit_27AFC5ABB6CF4F49F784EE05063BC0CE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_508608D53B5E1DEA4C5FEE05063BADCF" xlink:to="loc_us-gaap_LineOfCredit_27AFC5ABB6CF4F49F784EE05063BC0CE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LettersOfCreditOutstandingAmount" xlink:label="loc_us-gaap_LettersOfCreditOutstandingAmount_F2EBA51A7AE35840A3FDEE05063BB1C9" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_508608D53B5E1DEA4C5FEE05063BADCF" xlink:to="loc_us-gaap_LettersOfCreditOutstandingAmount_F2EBA51A7AE35840A3FDEE05063BB1C9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentFaceAmount" xlink:label="loc_us-gaap_DebtInstrumentFaceAmount_B575956F950726C31F3FEE05063BAE33" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_508608D53B5E1DEA4C5FEE05063BADCF" xlink:to="loc_us-gaap_DebtInstrumentFaceAmount_B575956F950726C31F3FEE05063BAE33" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtByMaturityAbstract" xlink:label="loc_us-gaap_LongTermDebtByMaturityAbstract_E06E3C05E124F0FB4D73EE05063B842B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_508608D53B5E1DEA4C5FEE05063BADCF" xlink:to="loc_us-gaap_LongTermDebtByMaturityAbstract_E06E3C05E124F0FB4D73EE05063B842B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear_FE3603197C728391B9C9EE05063B724C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermDebtByMaturityAbstract_E06E3C05E124F0FB4D73EE05063B842B" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear_FE3603197C728391B9C9EE05063B724C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_16F59EF87690E27CE4D3EE05063CD1DD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermDebtByMaturityAbstract_E06E3C05E124F0FB4D73EE05063B842B" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_16F59EF87690E27CE4D3EE05063CD1DD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_5350BAC85EE8E3364FD5EE05063CEB08" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermDebtByMaturityAbstract_E06E3C05E124F0FB4D73EE05063B842B" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_5350BAC85EE8E3364FD5EE05063CEB08" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_FA85CB58E6B814E8A455EE05063C013C" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermDebtByMaturityAbstract_E06E3C05E124F0FB4D73EE05063B842B" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_FA85CB58E6B814E8A455EE05063C013C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_811FCEA765B0B8B829BEEE05063CABF9" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermDebtByMaturityAbstract_E06E3C05E124F0FB4D73EE05063B842B" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_811FCEA765B0B8B829BEEE05063CABF9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_DebtInstrumentCarryingAmount" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_3C2DFE6C2594E3412105EE2E6ADF0D59" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_508608D53B5E1DEA4C5FEE05063BADCF" xlink:to="loc_us-gaap_DebtInstrumentCarryingAmount_3C2DFE6C2594E3412105EE2E6ADF0D59" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note6FutureLeaseLiabilityDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note6LeaseCostDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note6Leases" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note6LeasesDetail" xlink:type="extended">
    <link:loc xlink:href="sanm-20191228.xsd#sanm_AssetandLiabilitiesLesseeLineItems" xlink:label="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:type="locator" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_AssetandLiabilitiesLesseeTable" xlink:label="loc_sanm_AssetandLiabilitiesLesseeTable_B1A1564855257CAE7C03E84D6C7B291B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:to="loc_sanm_AssetandLiabilitiesLesseeTable_B1A1564855257CAE7C03E84D6C7B291B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationAxis" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_55E0959EBF61958C9C7DE84D6C7B7F18" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_sanm_AssetandLiabilitiesLesseeTable_B1A1564855257CAE7C03E84D6C7B291B" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_55E0959EBF61958C9C7DE84D6C7B7F18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_BF3E4763835D4BAA4A86E84D6C7CDE90_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_55E0959EBF61958C9C7DE84D6C7B7F18" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_BF3E4763835D4BAA4A86E84D6C7CDE90_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_BF3E4763835D4BAA4A86E84D6C7CDE90" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_55E0959EBF61958C9C7DE84D6C7B7F18" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_BF3E4763835D4BAA4A86E84D6C7CDE90" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherAssetsMember" xlink:label="loc_us-gaap_OtherAssetsMember_6440D2E0E1AD4956F1B6E84D6C7C1B4F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_BF3E4763835D4BAA4A86E84D6C7CDE90" xlink:to="loc_us-gaap_OtherAssetsMember_6440D2E0E1AD4956F1B6E84D6C7C1B4F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AccruedLiabilitiesMember" xlink:label="loc_us-gaap_AccruedLiabilitiesMember_81868548E8E10408B103E84D6C7C56EC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_BF3E4763835D4BAA4A86E84D6C7CDE90" xlink:to="loc_us-gaap_AccruedLiabilitiesMember_81868548E8E10408B103E84D6C7C56EC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherNoncurrentLiabilitiesMember" xlink:label="loc_us-gaap_OtherNoncurrentLiabilitiesMember_C2EF896D618CF43DE503E84D6C7CA363" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_BF3E4763835D4BAA4A86E84D6C7CDE90" xlink:to="loc_us-gaap_OtherNoncurrentLiabilitiesMember_C2EF896D618CF43DE503E84D6C7CA363" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LiabilitiesTotalMember" xlink:label="loc_us-gaap_LiabilitiesTotalMember_EC80326640955FCF5EB6E84D6C7C352B" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_BF3E4763835D4BAA4A86E84D6C7CDE90" xlink:to="loc_us-gaap_LiabilitiesTotalMember_EC80326640955FCF5EB6E84D6C7C352B" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_OperatingLeaseRightOfUseAssetAccumulatedAmortization" xlink:label="loc_sanm_OperatingLeaseRightOfUseAssetAccumulatedAmortization_7A2C6825A1B5E0564327E84D6C7DF452" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:to="loc_sanm_OperatingLeaseRightOfUseAssetAccumulatedAmortization_7A2C6825A1B5E0564327E84D6C7DF452" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseRightOfUseAsset" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_A4A4BDEE73F33D19F415E84D6C7DD619" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_A4A4BDEE73F33D19F415E84D6C7DD619" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseLiabilityCurrent" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_57A3A8DDF791D5F9874BE84D6C7D8DF8" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_57A3A8DDF791D5F9874BE84D6C7D8DF8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_1082D4A36097B4FD524AE84D6C7D84B5" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_1082D4A36097B4FD524AE84D6C7D84B5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseLiability" xlink:label="loc_us-gaap_OperatingLeaseLiability_B4BA670722285939160EE84D6C7D0B49" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:to="loc_us-gaap_OperatingLeaseLiability_B4BA670722285939160EE84D6C7D0B49" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1" xlink:label="loc_us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1_2BFC6E31E93EF3585EA6E84D6C7E1621" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:to="loc_us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1_2BFC6E31E93EF3585EA6E84D6C7E1621" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent" xlink:label="loc_us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent_1E03D8B4C8BD860B49DBE84D6C7EB920" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_AssetandLiabilitiesLesseeLineItems_612A880FA526F64A2CC5E84D6C7D5080" xlink:to="loc_us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent_1E03D8B4C8BD860B49DBE84D6C7EB920" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note6LeasesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note6LesseeLeaseDescriptionDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeLeaseDescriptionLineItems" xlink:label="loc_us-gaap_LesseeLeaseDescriptionLineItems_735AA4FCC3C61C94FEA7E93422EE6ABC" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeLeaseDescriptionTable" xlink:label="loc_us-gaap_LesseeLeaseDescriptionTable_8F5812D340215C821EA9E93422ECB94F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_735AA4FCC3C61C94FEA7E93422EE6ABC" xlink:to="loc_us-gaap_LesseeLeaseDescriptionTable_8F5812D340215C821EA9E93422ECB94F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeAxis" xlink:label="loc_srt_RangeAxis_48CC1E3DA967A8CC4B6CE93422ED736B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LesseeLeaseDescriptionTable_8F5812D340215C821EA9E93422ECB94F" xlink:to="loc_srt_RangeAxis_48CC1E3DA967A8CC4B6CE93422ED736B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_9F701C57D602DEFD530AE93422ED9E77_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_48CC1E3DA967A8CC4B6CE93422ED736B" xlink:to="loc_srt_RangeMember_9F701C57D602DEFD530AE93422ED9E77_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_9F701C57D602DEFD530AE93422ED9E77" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_48CC1E3DA967A8CC4B6CE93422ED736B" xlink:to="loc_srt_RangeMember_9F701C57D602DEFD530AE93422ED9E77" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_MaximumMember" xlink:label="loc_srt_MaximumMember_494231C423E188F1AA61E93422EEBAF0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_9F701C57D602DEFD530AE93422ED9E77" xlink:to="loc_srt_MaximumMember_494231C423E188F1AA61E93422EEBAF0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LesseeOperatingLeaseTermOfContract" xlink:label="loc_us-gaap_LesseeOperatingLeaseTermOfContract_C51D7CB8882127361496E93422EE25B2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_735AA4FCC3C61C94FEA7E93422EE6ABC" xlink:to="loc_us-gaap_LesseeOperatingLeaseTermOfContract_C51D7CB8882127361496E93422EE25B2" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note7AccountsReceivableSaleProgram" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note7AccountsReceivableSaleProgramDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems" xlink:label="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_7CFB82A47E9599B3FF21D3B7EB7D2880" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable" xlink:label="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable_31F4024D689C8E2FD8AED3B7EB7BF3DF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_7CFB82A47E9599B3FF21D3B7EB7D2880" xlink:to="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable_31F4024D689C8E2FD8AED3B7EB7BF3DF" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_SaleofAccountsReceivableAxis" xlink:label="loc_sanm_SaleofAccountsReceivableAxis_0492259F1AB1F1F204D0D3B7EB7B3914" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable_31F4024D689C8E2FD8AED3B7EB7BF3DF" xlink:to="loc_sanm_SaleofAccountsReceivableAxis_0492259F1AB1F1F204D0D3B7EB7B3914" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_SaleofAccountsReceivableDomain" xlink:label="loc_sanm_SaleofAccountsReceivableDomain_FAE54B68C68CAA286C9AD3B7EB7C19B3_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_sanm_SaleofAccountsReceivableAxis_0492259F1AB1F1F204D0D3B7EB7B3914" xlink:to="loc_sanm_SaleofAccountsReceivableDomain_FAE54B68C68CAA286C9AD3B7EB7C19B3_default" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_SaleofAccountsReceivableDomain" xlink:label="loc_sanm_SaleofAccountsReceivableDomain_FAE54B68C68CAA286C9AD3B7EB7C19B3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_sanm_SaleofAccountsReceivableAxis_0492259F1AB1F1F204D0D3B7EB7B3914" xlink:to="loc_sanm_SaleofAccountsReceivableDomain_FAE54B68C68CAA286C9AD3B7EB7C19B3" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_RPAMember" xlink:label="loc_sanm_RPAMember_1C4AE6DB665A422781C9D3B7EB7C08A9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_SaleofAccountsReceivableDomain_FAE54B68C68CAA286C9AD3B7EB7C19B3" xlink:to="loc_sanm_RPAMember_1C4AE6DB665A422781C9D3B7EB7C08A9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_EC87E59F7C976A5D6362D3B7EB7C458D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable_31F4024D689C8E2FD8AED3B7EB7BF3DF" xlink:to="loc_us-gaap_CreditFacilityAxis_EC87E59F7C976A5D6362D3B7EB7C458D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_86FF5F568720A885477FD3B7EB7DB42C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_EC87E59F7C976A5D6362D3B7EB7C458D" xlink:to="loc_us-gaap_CreditFacilityDomain_86FF5F568720A885477FD3B7EB7DB42C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_86FF5F568720A885477FD3B7EB7DB42C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_EC87E59F7C976A5D6362D3B7EB7C458D" xlink:to="loc_us-gaap_CreditFacilityDomain_86FF5F568720A885477FD3B7EB7DB42C" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_FaceValueofReceivableSoldPercentage" xlink:label="loc_sanm_FaceValueofReceivableSoldPercentage_BD890A65935E0F12E1A1D3B7EB7D3393" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_7CFB82A47E9599B3FF21D3B7EB7D2880" xlink:to="loc_sanm_FaceValueofReceivableSoldPercentage_BD890A65935E0F12E1A1D3B7EB7D3393" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_AccountsReceivableSoldDuringThePeriod" xlink:label="loc_sanm_AccountsReceivableSoldDuringThePeriod_1DACF8F0DCB6F05133D6D3B7EB7E0F41" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_7CFB82A47E9599B3FF21D3B7EB7D2880" xlink:to="loc_sanm_AccountsReceivableSoldDuringThePeriod_1DACF8F0DCB6F05133D6D3B7EB7E0F41" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TransferOfFinancialAssetsAccountedForAsSalesAmountDerecognized" xlink:label="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesAmountDerecognized_A522D9AC3B81C5DD029FD3B7EB8365DF" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_7CFB82A47E9599B3FF21D3B7EB7D2880" xlink:to="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesAmountDerecognized_A522D9AC3B81C5DD029FD3B7EB8365DF" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_AmountCollectedButNotRemittedtoFinancialInstitutions" xlink:label="loc_sanm_AmountCollectedButNotRemittedtoFinancialInstitutions_572CAF547FEA6EC7AF62D3B7EB836040" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_7CFB82A47E9599B3FF21D3B7EB7D2880" xlink:to="loc_sanm_AmountCollectedButNotRemittedtoFinancialInstitutions_572CAF547FEA6EC7AF62D3B7EB836040" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note8CommitmentsAndContingencies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note8ContingenciesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LossContingenciesLineItems" xlink:label="loc_us-gaap_LossContingenciesLineItems_63F20CB090E73708C817E914E39A2685" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LossContingenciesTable" xlink:label="loc_us-gaap_LossContingenciesTable_5474BFACF6388C77A050E914E39A4C95" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LossContingenciesLineItems_63F20CB090E73708C817E914E39A2685" xlink:to="loc_us-gaap_LossContingenciesTable_5474BFACF6388C77A050E914E39A4C95" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LossContingenciesByNatureOfContingencyAxis" xlink:label="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_63D5DC3124853ED62AEDE914E39AB9AF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LossContingenciesTable_5474BFACF6388C77A050E914E39A4C95" xlink:to="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_63D5DC3124853ED62AEDE914E39AB9AF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LossContingencyNatureDomain" xlink:label="loc_us-gaap_LossContingencyNatureDomain_D85A197D157E4DA3C077E914E39AFF60_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_63D5DC3124853ED62AEDE914E39AB9AF" xlink:to="loc_us-gaap_LossContingencyNatureDomain_D85A197D157E4DA3C077E914E39AFF60_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LossContingencyNatureDomain" xlink:label="loc_us-gaap_LossContingencyNatureDomain_D85A197D157E4DA3C077E914E39AFF60" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LossContingenciesByNatureOfContingencyAxis_63D5DC3124853ED62AEDE914E39AB9AF" xlink:to="loc_us-gaap_LossContingencyNatureDomain_D85A197D157E4DA3C077E914E39AFF60" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_CollectibilityofReceivableandExcessandObsoleteInventoryMember" xlink:label="loc_sanm_CollectibilityofReceivableandExcessandObsoleteInventoryMember_C47F3FEB606317FD95EDE914E39ABA40" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingencyNatureDomain_D85A197D157E4DA3C077E914E39AFF60" xlink:to="loc_sanm_CollectibilityofReceivableandExcessandObsoleteInventoryMember_C47F3FEB606317FD95EDE914E39ABA40" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_LossContingencyAccrualAtCarryingValue" xlink:label="loc_us-gaap_LossContingencyAccrualAtCarryingValue_899DD989720948B67882E914E39A3F78" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_63F20CB090E73708C817E914E39A2685" xlink:to="loc_us-gaap_LossContingencyAccrualAtCarryingValue_899DD989720948B67882E914E39A3F78" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note9Restructuring" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note9RestructuringAndRelatedActivitiesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note9RestructuringDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_0F1EC9B56409BE41AB9EE963E9E23C75" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_0F1EC9B56409BE41AB9EE963E9E23C75" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeAxis" xlink:label="loc_srt_RangeAxis_E43365791751708133D1E963E9E3D8D1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_0F1EC9B56409BE41AB9EE963E9E23C75" xlink:to="loc_srt_RangeAxis_E43365791751708133D1E963E9E3D8D1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_2FABBE296D596FB153A8E963E9E395FE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_E43365791751708133D1E963E9E3D8D1" xlink:to="loc_srt_RangeMember_2FABBE296D596FB153A8E963E9E395FE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_RangeMember" xlink:label="loc_srt_RangeMember_2FABBE296D596FB153A8E963E9E395FE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_E43365791751708133D1E963E9E3D8D1" xlink:to="loc_srt_RangeMember_2FABBE296D596FB153A8E963E9E395FE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_MinimumMember" xlink:label="loc_srt_MinimumMember_BDDFDFFF08D0751AF985E963E9E3FB3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_2FABBE296D596FB153A8E963E9E395FE" xlink:to="loc_srt_MinimumMember_BDDFDFFF08D0751AF985E963E9E3FB3D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd#srt_MaximumMember" xlink:label="loc_srt_MaximumMember_D29A01BC2D71EF5AEEE2E963E9E46119" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_2FABBE296D596FB153A8E963E9E395FE" xlink:to="loc_srt_MaximumMember_D29A01BC2D71EF5AEEE2E963E9E46119" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringPlanAxis" xlink:label="loc_us-gaap_RestructuringPlanAxis_03B49D61F90E142035BBE963E9E4C42F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_0F1EC9B56409BE41AB9EE963E9E23C75" xlink:to="loc_us-gaap_RestructuringPlanAxis_03B49D61F90E142035BBE963E9E4C42F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_0968F719969E891CCB50E963E9E4D235_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_03B49D61F90E142035BBE963E9E4C42F" xlink:to="loc_us-gaap_RestructuringPlanDomain_0968F719969E891CCB50E963E9E4D235_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_0968F719969E891CCB50E963E9E4D235" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_03B49D61F90E142035BBE963E9E4C42F" xlink:to="loc_us-gaap_RestructuringPlanDomain_0968F719969E891CCB50E963E9E4D235" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_Q1FY20PlanMember" xlink:label="loc_sanm_Q1FY20PlanMember_3CB1BB7CC9282744EDD6E963E9E488FD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_0968F719969E891CCB50E963E9E4D235" xlink:to="loc_sanm_Q1FY20PlanMember_3CB1BB7CC9282744EDD6E963E9E488FD" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_OtherplansMember" xlink:label="loc_sanm_OtherplansMember_B77104F3D5DA2D9F7DC9E963E9E5E545" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_0968F719969E891CCB50E963E9E4D235" xlink:to="loc_sanm_OtherplansMember_B77104F3D5DA2D9F7DC9E963E9E5E545" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_64A4ADC7BDC1103E63F8E963E9E5A138" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_0F1EC9B56409BE41AB9EE963E9E23C75" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_64A4ADC7BDC1103E63F8E963E9E5A138" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_A08CDD597728C2981896E963E9E5E0B2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_64A4ADC7BDC1103E63F8E963E9E5A138" xlink:to="loc_us-gaap_SegmentDomain_A08CDD597728C2981896E963E9E5E0B2_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_A08CDD597728C2981896E963E9E5E0B2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_64A4ADC7BDC1103E63F8E963E9E5A138" xlink:to="loc_us-gaap_SegmentDomain_A08CDD597728C2981896E963E9E5E0B2" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_IMSMember" xlink:label="loc_sanm_IMSMember_F555413C78AC95578EDDE963E9E5FC70" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_A08CDD597728C2981896E963E9E5E0B2" xlink:to="loc_sanm_IMSMember_F555413C78AC95578EDDE963E9E5FC70" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_AllOtherSegmentsMember" xlink:label="loc_us-gaap_AllOtherSegmentsMember_9C9E2FDEB32224E16D9DE963E9E6D943" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_A08CDD597728C2981896E963E9E5E0B2" xlink:to="loc_us-gaap_AllOtherSegmentsMember_9C9E2FDEB32224E16D9DE963E9E6D943" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringCostAndReserveAxis" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_94670E5E109ACEBDBA22E963E9E63394" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_0F1EC9B56409BE41AB9EE963E9E23C75" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_94670E5E109ACEBDBA22E963E9E63394" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_55B544B65B2E5F7CEA55E963E9E62CAE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_94670E5E109ACEBDBA22E963E9E63394" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_55B544B65B2E5F7CEA55E963E9E62CAE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_55B544B65B2E5F7CEA55E963E9E62CAE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_94670E5E109ACEBDBA22E963E9E63394" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_55B544B65B2E5F7CEA55E963E9E62CAE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_EmployeeSeveranceMember" xlink:label="loc_us-gaap_EmployeeSeveranceMember_027A8BF568FEC489000DE963E9E6328C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_55B544B65B2E5F7CEA55E963E9E62CAE" xlink:to="loc_us-gaap_EmployeeSeveranceMember_027A8BF568FEC489000DE963E9E6328C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_OtherRestructuringMember" xlink:label="loc_us-gaap_OtherRestructuringMember_4930626107602987E051E963E9E73386" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_55B544B65B2E5F7CEA55E963E9E62CAE" xlink:to="loc_us-gaap_OtherRestructuringMember_4930626107602987E051E963E9E73386" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringAndRelatedCostExpectedCost1" xlink:label="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_6BF74EE38A22AEAD66EBE963E9E810E1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_6BF74EE38A22AEAD66EBE963E9E810E1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringAndRelatedActivitiesInitiationDate" xlink:label="loc_us-gaap_RestructuringAndRelatedActivitiesInitiationDate_93296E71C698B4CA9CE3E963E9E823D6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:to="loc_us-gaap_RestructuringAndRelatedActivitiesInitiationDate_93296E71C698B4CA9CE3E963E9E823D6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringAndRelatedActivitiesCompletionDate" xlink:label="loc_us-gaap_RestructuringAndRelatedActivitiesCompletionDate_757B49337D8FBE3D3D2CE963E9E92C09" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:to="loc_us-gaap_RestructuringAndRelatedActivitiesCompletionDate_757B49337D8FBE3D3D2CE963E9E92C09" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated" xlink:label="loc_us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated_7C29C62CD3BB8637A694E963E9EBAE6E" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated_7C29C62CD3BB8637A694E963E9EBAE6E" xlink:type="arc" />
    <link:loc xlink:href="sanm-20191228.xsd#sanm_RestructuringExpenseRecoverynet" xlink:label="loc_sanm_RestructuringExpenseRecoverynet_48829CA62144A698E9AAE963E9EB3E52" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:to="loc_sanm_RestructuringExpenseRecoverynet_48829CA62144A698E9AAE963E9EB3E52" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringCharges" xlink:label="loc_us-gaap_RestructuringCharges_20B2AF8FBD3C36294799E963E9EB8525" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:to="loc_us-gaap_RestructuringCharges_20B2AF8FBD3C36294799E963E9EB8525" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd#us-gaap_RestructuringReserve" xlink:label="loc_us-gaap_RestructuringReserve_79386BA5F1E24DFACC96E963E9EB8941" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_CBDD77FF087C3F27FABAE963E9E7D548" xlink:to="loc_us-gaap_RestructuringReserve_79386BA5F1E24DFACC96E963E9EB8941" xlink:type="arc" />
  </link:definitionLink>
</link:linkbase>
