I don't ever have the battery plugged in, I run the laptop straight from the mains, it places less strain on the charger and helps to lower the temperature slightly too.
Unfortunately, not all notebooks allow you to run without a battery in circuit. But even so, because there is still electro-chemical activity going on in a battery sitting on the shelf, a battery can still go bad or grow old and die while doing nothing.
I agree that it puts less strain on the charger, but a charged battery draws very little current anyway. And charging a fully discharged battery is what the power supplies and charging circuits are designed to do.
My nearly 4 year old Toshiba notebook (with battery installed) is connected to the charger/power supply nearly full time. I don't worry about running the battery down to 20% or 7% or any percent. Periodically, I simply run the battery down until the notebook's power management routines say, "enough!" and force the OS and notebook into hibernation (to save any open docs) and shuts downs. That's rock bottom. Then I charge it up.
Modern batteries don't suffer from memory effect like old NiCd, and nearly as old NiMH batteries do, but new research has found that modern
lithium-ion batteries suffer from memory effect too. They gradually lost their maximum capacity if repeatedly recharged after being only partially discharged. The batteries would "remember" the smaller capacity as being normal. So period "deep" discharging and charging is still a prudent practice, and running that battery through a few deep charging cycles is what I would do to see if some of the capacity can be recovered.
That said, I agree with x BlueRobot that heat is a concern and deep charging can surely generate some heat. So ensure vents, bays, recesses and cavities are clean of heat-trapping dust and there is lots of free space around the power block.
Still, batteries die and need to be replaced.
Dell reports battery runtimes degrade after just 18 months and recommends replacing them when, "
the run time does not meet your needs".