The accepted practice is to arrange before Pesah for the sale of the Hames in one's home which he does not wish to destroy before Pesah. The Hames is stored in certain locations in the home that one closes off before the holiday, and on Erev Pesah the Hames' sale to a gentile takes effect, such that the Hames is not in the Jew's ownership during Pesah.
The question arises as to whether the obligation of Bedikat Hames searching one's home for Hames on the night before Erev Pesah applies to these areas. Since one knows that these areas will contain Hames, and that Hames will in any event be sold the following day, it would appear unnecessary to search these areas for Hames. Indeed, the Hatam Sofer (Rabbi Moshe Sofer of Pressburg, 1762-1839) ruled that one who sells his Hames does not need to search through the areas of the house where the sold Hames is stored. The Hayei Adam (Rabbi Avraham Danzig of Vilna, 1748-1820), however, disagreed. He argued that since the sale of the Hames takes effect only the following day, on the morning of Erev Pesah, it does not impact upon the obligation of Bedikat Hames, which applies the previous night. At the time of Bedikat Hames, no Hames has been sold, and therefore the obligation to search for Hames applies to the entirety of one's home, including those areas where he will store the Hames that will be sold the following day.
As for the final Halacha, Hacham Ovadia Yosef follows the position of the Hatam Sofer, who held that one need not search the areas in the home where he will store the Hames that he plans to sell to a gentile. Thus, although the obligation of Bedikat Hames requires a thorough search of one's home, it does not apply to those areas which contain the Hames to be sold to a gentile, and which will be closed off throughout the holiday of Pesah.