A customer compares the iPhone SE (left) and the iPhone 6S (right) at an Apple Store in Hangzhou, China. VCG | VCG | Getty Images

The more I talk to people about their phones, the more I learn that most seem to be pretty happy with the model they own. And analysts say folks are holding on to iPhones for three or four years, longer than ever. Most smartphones released in the past few years have cameras that are good enough and solid battery life and can still perform the necessary functions of a more expensive phone, like surf the web, stream movies and music and provide access to the latest apps. Most of the time, you don't really need a new phone. So, if you're perfectly happy with the one you own, even if it's a couple of years old, here's how you can keep it running as long as possible.

Apply software updates

Apple iPhone Xs and iPhone Xs Max CNBC | Magdalena Petrova

Make sure you're always running the latest software. Updates are usually issued to fix security problems, squash software bugs and improve performance. I've heard complaints about some older phones, usually about four years in age, slowing down with the latest software, but sometimes that's the trade-off for making sure you have all of the latest features introduced by Google's Android or Apple. At this point, it might be worth considering an upgrade, but until then, keep applying regular updates. You can update an iPhone by going to Settings > General > Software Update. It varies on different Android phones, but typically you should be able to find it in Settings > System > Advanced > Software Update.

Free up space

See which apps you don't even use. Todd Haselton | CNBC

Another reason people usually tell me they need a new phone: They're running out of space. I have an entire guide on how to free up space on your iPhone, but here are a few more tips. Pictures and videos can hog a ton, so consider using Google Photos or Apple Photos, which back up your pictures and videos to the cloud and let you free up loads of space on your phone. Apple Photos is free until you use up 5GB of your iCloud storage, after which plans start at 99 cents per month for 50GB of storage. Google Photos has free unlimited storage, but lowers the quality of your photos. If you want to upload full high-quality images and run out of your free 15GB of Google One storage, consider buying more. Google One plans start at $1.99/month for 100GB of storage.

You should also free up space by deleting apps you don't use. To free up space on your iPhone, do this: Open Settings.

Tap General.

Choose iPhone Storage

The apps that take up the most space are listed up top, so move through and delete the ones you don't use. It varies on different Android phones, but to free up space on your phone, try this: Open Settings.

Choose Storage.

Tap Free Up Space.

Remove the apps and downloads you don't use.

See what's eating up your battery life

The apps using up battery on my iPhone. Todd Haselton | CNBC

Maybe your battery life seems to be worse than it used to be. This could be the case, and I'll address getting a new battery in the next step. But sometimes it's just an app that's eating more than its fair share of your power. To find out what's using your battery life, do this. On an iPhone: Open Settings

Tap Battery.

Scroll down.

See the "Battery Usage by App" section.

Remove apps you don't need that are eating a lot of battery, or limit how often you use them. It varies on Android by phone, but try this: Open Settings.

Tap Battery.

Tap the menu icon on the top-right.

Choose "Battery Usage."

See which apps are using the most battery and either remove them or limit how much you're using those apps.



Pay for a battery replacement

You might see this option if your battery is aging. Todd Haselton | CNBC

Android users are a little out of luck here, at least in terms of simply walking into a store and getting a new battery. But Apple offers a battery replacement program that can help keep your older devices running longer. First, you want to check your battery health. Do this: Open Settings

Tap Battery.

Choose Battery Health. If your iPhone says it is no longer performing at peak performance capability, or if your maximum capacity is well below 90 percent, consider buying a replacement using Apple's battery replacement program. If your iPhone is still in warranty or covered by Apple Care, Apple will replace the battery for free. If it's out of warranty, expect to pay $69 for an iPhone X, iPhone XS, iPhone XS Max or iPhone XR battery. Expect to pay $49 for a replacement battery for any other older iPhone.

Protect your phone

A cracked phone. Tyler Finck | Getty Images

The other reason people often tell me they need a new phone is that they've cracked their screen or damaged their phone. You can prevent this by using a screen protector and a case. I like Best Buy's in-store brand, Insignia, which makes affordable but really good screen protectors that don't bubble and are easy to apply. If you're prone to damaging your phone, also consider buying an insurance plan that covers accidental damage. This typically costs around $11 per month from your carrier, but there are better options. Samsung has its own 24/7 premium care plans for its phones, while Apple Care+ offers repairs for accidental damage, theft and more. There's a $29 deductible for screen damage, a $99 deductible for other damage that might require a replacement, and a $199 - $269 deductible depending on your phone model if it's lost entirely.