Image source: Getty Images.

"You only have to do a very few things right in your life so long as you don't do too many things wrong."
-- Warren Buffett

He's right: more often than not, if you simply hold on to a stock over the years through thick and thin, you'll likely be well rewarded. It can be difficult to never sell, especially when times seem dire -- but if you can pick companies with durable competitive advantages, you should be able to sleep at night and avoid pressing the panic "sell" button.

Here are four Motley Fool contributors with companies that they recommend never selling: International Business Machines (IBM 0.13%), Allergan (AGN), Enterprise Products Partners (EPD), and Boeing Co. (BA 1.34%).

A century of adaptation

Tim Green: Every stock that I buy I intend to hold for years. Ideally, a stock will produce exceptional returns indefinitely, never requiring me to sell. Things change, of course, and investors can't be afraid to sell a stock if their thesis has been turned upside down. But in general, the longer the holding period, the better.

Predicting how technology will evolve is hard, if not impossible, and that makes committing to holding a technology stock indefinitely risky. But International Business Machines, a company that has been around for a century, is one tech stock that I'm comfortable holding for a long time. The company has transformed itself on multiple occasions during its lifetime, shifting from mechanical tabulating machines to computers, then transitioning into a software and services company, and now throwing its weight behind cloud and cognitive computing.

Transitions are always painful, and the current one IBM is undergoing is no exception. Revenue has been declining for years, and earnings are being pressured as the company shifts resources from legacy businesses to areas that offer the most potential. There's no guarantee that IBM will succeed, but if I'm going to be holding a tech stock for a very long time, a company with a long history of adaptation makes the most sense.

This high-growth pharma stock has a solid foundation

George Budwell: There aren't many stocks I would absolutely never sell, but specialty pharma Allergan is an exception to the rule. The short story is that Allergan is currently in the process of shedding its generic-drug business to focus on branded products like the double-chin treatment Kybella, and the IBS drugs Linzess and Viberzi, among many others. As a result, the health of the drugmaker's balance sheet has improved dramatically in the last few months, with the company already retiring $9 billion in debt this year. And Allergan's recent double-digit top-line growth appears to be sustainable for the long haul, given that the drugmaker is in the midst of multiple new product launches at the moment.

Having said that, Allergan's penchant for wheeling and dealing is an area of concern. So far, management has carefully guided the company through multiple acquisitions that have led to an overall healthier enterprise. However, one bad deal in the pharmaceutical industry can hamper a company's growth for a decade or more. That's why I would personally prefer for Allergan to pay off even more debt, and perhaps sit tight for the time being, instead of rushing out to spend its recent windfall from the sale of its generic unit. But this is Allergan, after all, meaning that a monstrous acquisition is almost certainly coming down the pike soon. So, hopefully, management can continue their winning ways by adding yet another value-creating asset to the company's already strong product portfolio of branded medicines. Stay tuned.

An anchor income holding

Matt DiLallo: Midstream pipeline giant Enterprise Products Partners has been a part of my portfolio since 2007. I plan on keeping it right where it is, and adding to my position over time, because I view it as an anchor income holding. It is a decision that paid off very well in the past, and one that I expect will continue for many years to come.

What drew me toward Enterprise Products Partners was its eye-popping yield, which at the time of my initial investment was just shy of 7%. However, since my first purchase, the distribution has gone up every single quarter. Because of that, the yield on my initial investment is now more than 11.5%.

Three factors drive Enterprise's ability to grow the payout. First, it primarily owns fee-based assets that are under long-term contracts, so it generates rather stable cash flow. Second, unlike most master limited partnerships, it does not distribute all of its cash flow back to investors; instead, it retains a substantial portion to reinvest into growth projects, including $5.3 billion since 2011. Finally, the company continues to construct a steady stream of fee-based assets that drive cash-flow growth; currently, it has $5.6 billion of projects under construction to drive growth through 2018.

With a solid foundation and ample running room for future growth, Enterprise Products Partners is one company that I have no desire to sell.

Still flying high

Daniel Miller: Investors hopping off the Boeing Co. bandwagon could be forgiven, especially after a rough second quarter, when the aviation juggernaut took almost $3 billion in pre-tax charges from its 787, 747 and KC-46 tanker programs. However, despite the rough quarter, Boeing still has durable comparable advantages with its commercial and defense businesses, which make it a stock you shouldn't sell.

Boeing operates in an intensely regulated commercial aircraft industry, so it's extremely difficult for new competitors to enter the market, leaving Boeing and Airbus to dominate the area. There are very real barriers to entry imposed by the knowledge and experience required to develop, design, assemble and certify commercial aircraft; that isn't changing any time soon, which is great news for investors willing to stick around for the long haul.

Another bonus is that over the past five years, Boeing has increasingly focused on returning value to shareholders through dividends and share repurchases, as you can see below:

BA Shares Outstanding Chart

BA Shares Outstanding data by YCharts.

And despite being in a cyclical industry, Boeing has more than $470 billion worth of orders in its combined commercial and defense backlog, which is roughly five years' worth of revenue transparency. On top of that, Boeing made the decision to incrementally improve both the 737 and 777 programs, rather than develop all-new aircraft, which should generate more cash flow and increase its return on invested capital.

The downside with Boeing is that the company operates in a cyclical industry, which guarantees turbulence at some point, and when operational mistakes happen they cost a pretty penny – see Boeing's second quarter. But any company that operates in an industry with steep barriers to entry and has a history of returning value to shareholders is a company you shouldn't sell anytime soon.