It’s one of the questions that comes up most often in the group, especially in summer or when someone is thinking of spending a few months in Spain for family reasons, health reasons or simply because they can. The short answer is: it depends on the type of visa you hold, and there’s a mistake that many people make without realising it.
With an EU/EFTA citizen’s B permit, the permit is directly linked to your centre of life being in Switzerland. If you are absent for more than six consecutive months without a valid reason recognised by the canton (a work assignment abroad for your Swiss employer, a medical condition, etc.), the cantonal authority may consider that you have abandoned your residence and may refuse to renew your permit. There is no automatic penalty on the 181st day, but in practice six months is the threshold beyond which problems arise. With a C permit, the situation is somewhat more stable, but the principle is the same: a prolonged absence without justification may lead to the withdrawal of the permit.
The most serious mistake people make is to deregister from the local council before moving away. They do so with the best of intentions, thinking they are acting in accordance with administrative procedures. The result is that deregistering is tantamount to voluntarily giving up your permit. If you then want to return, you no longer have the legal basis to do so directly. It’s as simple as that – and just as irreversible.
If you plan to be away for several months, you should notify the local authority without deregistering, retain your address in Switzerland and, if possible, your tenancy agreement. Some cantons are stricter than others when it comes to monitoring these situations, but the federal principle is the same across the board. The SEM is clear on this point: a residence permit presupposes that you are actually resident in Switzerland.