Where there is no special declaration of the statute to the contrary, the homestead of every family, whether owned by the husband or wife is exempt from judicial sale, [§3163.] A homestead right may exist in property purchased under a bond for a deed, if payments have been made and the purchaser is in possession. Actual occupancy is necessary to invest property with the homestead character, but as the exemption right is for the benefit of the whole family and not alone of the owner, the fact that the head of the family is absent, and may even have acquired property and residence in another state with the intention of removing his family there, will not divest the homestead of its exemption right, so long as the family continues to occupy it. And the fact that the husband has abandoned the homestead will not affect the homestead right, so long as the wife and family remain in occupancy. The homestead right may belong to one of several tenants in common of undivided property, or in a leasehold interest. It may attach to portions of a building—as where rooms or floors in a building are used for homestead purposes and the rest of the building is not so used. Where part of a building is owned or occupied by a family as a home, and the other part is used for a different purpose, that part used as a home may be exempt, while the other portion may be sold under execution. The exemption right may be lost by the execution of a mortgage or contract expressly making the homestead liable, in which both husband and wife join; or it may be forfeited when the homestead is used as a saloon or for any other purpose in violation of the prohibitory liquor law, with the knowledge and consent of the owner, and this is true even though such unlawful use is without the consent of the wife of the owner. In such case it is subject to judgment obtained because of such illegal use. [§2419.] If the homestead is sold, the proceeds are exempt only when invested in the purchase of another homestead, but the exemption does not follow the proceeds out of the state, and where the homestead was sold and the proceeds invested in a homestead in another state, and this was afterwards sold and the proceeds again invested in a homestead in this state, it was held that the homestead exemption did not attach to the second homestead in Iowa. Removal from the homestead without intention of returning will be sufficient to forfeit the homestead right, but the length of time of absence, in itself, will not constitute abandonment, so long as the intention to return exists.