If we need it to operate or provide our Products

For example, we keep profile information, photos you’ve posted (and not deleted) and security information for the lifetime of your account.
And when you search for something on Facebook, we keep your search history until you clear the search in your activity log or delete your account. Once you clear a search or delete your account, it will no longer be visible to you, and it will be deleted.
But even if you don’t clear your search or delete your account, within six months of your search we delete information about that search that isn’t necessary to show you your search history, like information about the device you were using, or your location.