Can one sell his entire house for pesach even if he will be staying in it the whole pesach and he is unaware where some chametz maybe. Then he need not worry since even if he sees chametz it doesn”t belong to him.
For Chametz one may not find in his bedikas chametz, we perform “bitul chametz” declaring it ownerless and insignificant, and hence one will not violate the prohibition of owning chametz on Pesach. In our times, the traditional sale of chametz will also include any chametz left around the house, and so you are correct this is another method to assure one will not violate owning chametz on Pesach.
Only one leaving his house for Pesach makes a sale of the actual house, to avoid the obligation to thoroughly check the whole house for Pesach. One who is staying for Pesach has no gain in selling his house [and getting permission to stay in it], as he is required to do a bedikas chametz non the less due to the concern he may come to consume the chametz he stumbles upon on Pesach.
See Shulchan Aruch Harav 432:8, Chok Yaakov 436:14, Mishna Brura ibid. 25, Biur Halacha beginning of 437, Mekor Chaim ibid.