Buying back shares has long been a common way for a company to boost its stock price. By reducing the number of outstanding shares, the company theoretically increases the value of each share. Last year, more than half of all S&P 500 companies participated in buybacks.

But this year’s financial meltdown has put a spotlight on how damaging the wrong kind of buyback can be. Buybacks have mostly dried up as the pandemic-induced shutdowns and ­recession left many companies gasping for cash. And the emergency CARES Act blocked any large company that accepts a federal loan from making stock buybacks until 12 months after the loan is repaid.

Over the past three years, many companies took on substantial debt to fund buybacks, leaving them short on cash now, while others were able to fund them out of profits. What to do… 

Before deciding whether to keep or buy—or sell—shares of stock in a company that has done a big buyback, check the “debt-to-equity ratio” on ­YahooFinance.com or Morningstar.com. If the total debt is greater than 50% of its total capital, avoid the stock—this may mean it won’t have enough cash to service its debt and/or won’t be able to raise more money. 

Among companies that have done big buybacks, ranging from tens of millions to several billion dollars, avoid the following ones, which have high debt levels and have been overvalued recently—Booking Holdings (formerly known as Priceline.com)…Dunkin’ Brands…Hilton Worldwide…Ross Stores…and Yum Brands. 

Instead, favor the following, which despite big buybacks have maintained low debt levels and attractive valuations—psychiatric services provider Acadia Healthcare (ACHC)…auto-parts supplier BorgWarner (BWA)…defense manufacturer Northrop Grumman (NOC)…chip maker ON Semiconductor (ON)…and health-testing firm Quest Diagnostics (DGX).