Apple CEO Tim Cook looks on at an Apple Store on September 20, 2013 in Palo Alto, California. Apple launched two new models of iPhone: the iPhone 5S, which is preceded by the iPhone 5, and a cheaper, paired down version, the iPhone 5C. Getty Images

If you're still holding on to an old iPhone, whether it's an iPhone 4s or an iPhone 6, we have some tips to help you keep it running as long as possible. Unfortunately, eventually, your best bet is going to be to upgrade. If you're months away from an upgrade, or just don't really care enough to go out and spend money on a new iPhone, then follow these tips to keep things running as smoothly as possible.

Don't update iOS

Downloading iOS 11.2.5 Todd Haselton | CNBC

Apple's going to chase us down for this one, but it's true. Apple adds new features to iOS, including often performance enhancements, but newer software can also put new strain on your processor. One of the biggest complaints I hear is that "the new iOS slowed my phone down!" If it ain't broke, don't fix it, just know that you might not have the latest security updates — which is important to most folks.

Get a new battery

An Apple store employee with a customer in Chicago. Getty Images

Older iPhones have aging battery packs that can't store a charge as well as they did when they were new. To fully refresh this, take your iPhone in and pay for a new battery. If you have an iPhone 6, iPhone 6s or iPhone 6s Plus, you can visit an Apple Store and swap out your battery for a new one for just $29, otherwise you can expect to pay about $79.

Free up storage

Get rid of unused apps automatically Todd Haselton | CNBC

As iPhones become more powerful, the processors are able to handle much larger and more complicated applications. Unfortunately, this means that apps that might have been small in size are now much larger. Free up storage and remove old apps and photos (consider using iCloud Photos, for example.) Do this by going to Settings > General and selecting iPhone Storage. Your iPhone will show you the largest apps, and you can delete the ones you no longer use. If you ignored step one and already installed iOS 11, select the option to automatically uninstall apps you don't use.

Clean your charging port

Apple's iPhone 5S Image source: Apple