2019, respectively. During the second quarter of 2020, the Company recorded an estimated sales tax expense of $2.7 million and during the second quarter of 2019, the Company recognized a $6.0 million gain related to the cash settlement of litigation.
Second quarter 2020 net income was $0.1 million, or $0.01 per diluted share, a decline of 93% from net income of $1.5 million, or $0.14 per diluted share in the second quarter of 2019. For the year-to-date periods, net income was $2.5 million, or $0.22 per diluted share, in 2020 compared to a net loss of $1.5 million, or $0.14 loss per diluted share, in 2019, an increase of 265%.
Adjusted EBITDA increased 19% and 36% year-over-year to $10.1 million and $22.5 million in the second quarter and first half, respectively.
Second Quarter and First Half 2020 Segment Information
Debit and Credit:
Net sales increased 14% and 18% year-over-year to $58.3 million and $118.1 million in the second quarter and first half, respectively. Growth for the second quarter was driven primarily by continued strong demand for dual interface EMV® cards, including Second Wave™, increased CPI On-Demand™ sales and COVID-19 related wins of government disbursement work. This growth was partially offset by COVID-19 impacts including reduced volumes in card personalization stemming from fewer new accounts and replacement cards. Card@Once product sales were also impacted by the closure of certain bank branches or reduced hours of operation, due to governmental stay-at-home orders.
Prepaid Debit:
Net sales were down 15% and 14% year-over-year to $13.5 million and $28.1 million for the second quarter and first half, respectively. Second quarter results were impacted primarily by reduced sales volumes from COVID-19, due to lower retail store traffic resulting from governmental stay-at-home orders. For the first half, year-over-year comparisons were impacted by COVID-19 in the second quarter of 2020 and from first quarter 2019 benefits as we supported stronger demand due to industry regulatory changes.
Balance Sheet, Liquidity, and Cash Flow
As of June 30, 2020, cash and cash equivalents was $54.4 million. Cash provided by operating activities was $8.8 million and capital expenditures were $0.7 million in the second quarter of 2020, yielding Adjusted Free Cash Flow of $8.1 million. This compares with the second quarter of 2019, when cash provided by operating activities was $9.2 million inclusive of $6.0 million cash received from a litigation settlement, and capital expenditures of $0.5 million resulting in Adjusted Free Cash Flow of $2.7 million. In the second quarter of 2020, Adjusted Free Cash Flow increased $5.4 million year-over-year. For the first half, cash provided by operating activities was $12.0 million, capital expenditures were $1.6 million and Adjusted Free Cash Flow was $10.4 million.
Total long-term debt principal outstanding, comprised of the Company’s $30 million Senior Credit Facility and its $312.5 million First Lien Term Loan, was $342.5 million at June 30, 2020. Net of debt issuance costs and discount, total long-term debt was $334.8 million as of June 30, 2020. The Company’s Senior Credit Facility matures in May 2022 and the First Lien Term Loan matures in August 2022.
John Lowe, Chief Financial Officer of CPI, said, “Despite the ongoing COVID-19 pandemic and economic uncertainty, solid execution led to 7% year-over-year top-line growth and another quarter