If you pull the permit BEFORE the city catches you there's usually no problem as they don't really know it was previously installed. IF they bust you, many cities charge a multiple of what the original permit fees would have been. From what I"ve seen it can be from 2 to 5 times the original amount.
In California, with the real estate disclosure laws, you should be able to simply disclose to any potential buyer any "improvements" that were done without a permit and be off the hook for any responsibility (of course they may require a permit be pulled as part of their offer... in which case see my first paragraph, or listen to Chas

)
I should note though, that there's a city near me where whenever someone puts a home up for sale there's a mandatory inspection done by the city prior to listing it. They tend to catch a LOT of work that was done without a permit..... what some municipalities will go to raise money
