Who owns the knowledge in your head; you, or the company you work for?
Firstly, Knowledge Management teaches us that knowledge is a collective property. Knowledge is distributed. What is in your head is only opinion, until it is validated through combination with the knowledge of others. In an organisational sense, knowledge is owned by the communities of practice.
Secondly the organisation has invested a lot of money in developing your knowledge. Through training, through on-the-job coaching, and through the provision of knowledge management frameworks, the organisation has supported and sponsored you in developing the knowledge in your head. They have a stake in it.
Thirdly you will have been working with confidential material for many years. Some of the codified, documented knowledge in your organisation will be confidential. Some will be secret. The same is true of some of the tacit knowledge, some of which you have have in your head. You cannot leave a company and immediately start to share confidential material just because you remember it. You cannot legally give away trade secrets, proprietary methodologies or confidential approaches.
Fourthly when a consultant works with a company, they sign clear agreements which define, as closely as possible what existing knowledge belongs to whom, and what must happen to new knowledge created during the consultancy. Generally the new knowledge remains with the company, not the consultant, and the consultant keeps what he/she brought to the party, and anything that was in the public domain.
There is some knowledge that you can take away, however.
The first is the knowledge that has become embedded and encoded in your muscle memory. Imagine you are a sports star and you transfer clubs. You are not allowed to give to the new club the details of your previous club's playbook, but you can take your skills with you, even though your previous club invested in your skills development.
Secondly you can take away your judgement. Judgement, aka wisdom, represents how you act on the knowledge you receive, and this is so innate to the way you operate, than it cannot be taken away.
Thirdly you take away your experience. This is the aggregate of all the work you have ever done, and represents the heuristics you apply to future work.
So who owns the knowledge?
I would suggest that the best approach for anyone working in an organisation is to treat the knowledge as something shared within the organisation, something that you do not own, but can contribute to and draw from.
Certainly do not hoard your knowledge - your hoard is trivially small compared the the sum total knowledge of the network. Share what you know openly, and openly benefit from the knowledge of others. Then when you move on, leave the details and the confidential material behind.