Why timing matters

The company, not the founders, owns the code its employees and contractors wrote. While the company exists, it can sign an agreement transferring the code to a buyer. After dissolution there is nobody with authority to sign, and in the UK, for example, assets left in a dissolved company pass to the Crown.

Selling first also helps the shutdown. The proceeds can pay final bills and go to shareholders, and handing the product to a buyer is often kinder to customers than switching it off.

Legal checklist for selling startup source code

Buyers and their lawyers will check the same things. Having them ready shortens the sale and protects the price.

Compliance steps before transferring code

Remove secrets before anyone outside the company sees the repository. Rotate API keys, database passwords and signing certificates, and scrub them from the git history, since a buyer receives every past commit.

Decide what happens to customer data. Under GDPR and similar laws you generally cannot hand personal data to a buyer without a lawful basis and notice to the people it describes. Most code sales either exclude personal data or transfer it with the product under a clear notice to users.

How to prepare a codebase for sale

A buyer pays more for a codebase they can run. Write a short document covering how to set it up, how it is deployed, which services it depends on and what is known to be broken. Make sure it builds from a clean checkout.

Then dissolve the company

Once the sale completes and the money is received, carry on with the wind down. How to shut down a startup covers the steps.

Common questions

Can I sell my startup's code after dissolving the company?

Usually not easily. Once dissolved, nobody has authority to sign the transfer, and in some countries the company's remaining assets pass to the state. Sell the code first, then dissolve.

Do I have to delete my startup's code when shutting down?

No. You are generally free to keep or sell the code. You may need to delete customer personal data, and you should honour any contract that requires deleting customer content, but the code itself can be sold.

Can founders keep the code personally after a shutdown?

Only if the company transfers it to them, ideally in writing and for a fair price, since shareholders and creditors have an interest in the company's assets.

Related reading