Log, sell all nanobots or batteries, buy them back (so the server will notice activity of the char), log out. That is what I do for unused ships to keep them undeleted and it works so far.
yeah just dock and undock, tho ive never really done that, just log a character on an account, wait a few seconds and then log off, works for me, never lost a ship/account