As controversy heats up surrounding the missing text messages exchanged between FBI officials Peter Strzok and Lisa Page, some have wondered whether text messages can be deleted forever or go unaccounted for.

Like most things with technology, it's not a simple yes or no answer.

In order to retrieve texts that have gone "missing," having access to the device greatly aids in in recovery, even if the messages were deleted from the phone, according to CIO.com.

FACEBOOK CAN'T GUARANTEE SOCIAL MEDIA IS GOOD FOR DEMOCRACY

Trent Leavitt, manager of computer forensics at Decipher Forensics, said it all depends on the make and model of the device.

"You could be talking about two different Android phones that have different model numbers," Leavitt told Fox News. "If the phone is present and you're able to get into the phone, there's always a chance for you to recover deleted text messages. Getting the texts you want, that's up in the air. If you're looking to recover deleted data, we're at the mercy of what's left on the device."

He gave the example of a Samsung Galaxy S5, of which there are several different makes. That plays a role in whether data can be extracted from the phone.

Leavitt noted that iPhones are harder to get into than Android devices, adding that there are only a couple of companies that can break into iPhones, but recovering deleted texts is easier on an iPhone than an Android, because the "iPhone database holds onto deleted texts longer than Android does."

Decipher Forensics is a computer forensics company that provides digital forensics, eDiscovery and complex data recovery services. Decipher Forensics was recently purchased by EideBailly, a regional certified public accounting and business advisory firm located in Fargo, North Dakota.

A senior Department of Justice official stressed to Fox News that the text messages were never "never uploaded to the server” and were never in the DOJ's possession and then lost or misplaced.

The FBI has said it was a technical glitch – and Verizon or Samsung may be brought into the mix to help with the investigation.

"We believe that Samsung devices are not the cause of this issue, " a Samsung spokesperson told Fox News, adding that the company "will fully cooperate with any investigation."

On Tuesday, President Trump described the missing messages as "one of the biggest stories in a long time."

At the mercy of the leftover data

Even if a device is present, a text can be permanently deleted, especially on an iPhone. If a device is restored to factory settings, all data is removed from the phone.

To do this, go to Settings > General > Reset > Erase All Content and Settings > Erase iPhone > Erase iPhone (this is the second time).

There are also similar steps that can be taken for an Android device, according to SafeSwiper.com.

It may be possible to gain access to deleted texts from carriers such as AT&T, Verizon, Sprint and T-Mobile, but anyone looking for the data, including law enforcement, needs to ask for it quick. The big four telecom providers only keep the data for a few days, and some don't even keep it at all, according to Gazelle.com.

APPLE'S TIM COOK SAYS NEXT IOS UPDATE WILL ALLOW USERS TO DISABLE BATTERY THROTTLING

Mixed results trying to retrieve information

In the past, law enforcement agents have had mixed success gaining access to deleted texts, thanks to Cellebrite, an Israeli company that manufactures data extraction, transfer and analysis devices for cellular phones and mobile devices.

Cellebrite – a subsidiary of Japan's Sun Corporation – was reportedly used (but never confirmed) by the FBI to gain access to the iPhone of Syed Rizwan Farook, the main perpetrator in the 2015 San Bernadino shooting that left 14 people dead and 22 others seriously injured.

If the device is destroyed or can't be found, Leavitt noted it's significantly harder than if the device is present.

"If the device can't be found, you're looking for backup, iCloud, or a backup to PC and then sometimes those backups are encrypted and the encryption needs to be broken," he said.

If a device is destroyed, companies will use what's known as chip off forensics to get access to the phone's NAND chip to get the data needed. "This is called parsing and can be used to extract things like apps, photos, videos and texts," Leavitt said, before cautioning that it is all dependent upon the make and model of the phone.

Fox News’ Brooke Singman and Griff Jenkins contributed to this report. Follow Chris Ciaccia on Twitter @Chris_Ciaccia.

This story has been updated to add Samsung's response.