<p>Can this be done by setting a property? </p>

<p>I'd prefer that approach then to remove all security before re-adding it. 
(As this may have other consequences.)</p>

<p>Another option I can think of is to replace the particular webpart dll with a temporary one, and restart the .net process, but that's not an approach I like at all.</p>

<p>What other options are there? AM I missing something obvious?</p>

<p>What i'm trying to do is find a way to disable a webpart while we update the underlying database schema it's using, for example. 
So we'd ideally like to disable a specific webpart for all users, whether it's on a mysite, or a community site, make the required changes and then re-enable it.
Thus decreasing the downtime for users.</p>

<p>Whatever the solution is, we need to be able to do it across multiple front end servers, on potentially two farms easily. </p>

<p>Thanks for your help.</p>

Go to Site Actions -> Edit Page
You get all the web parts edited. Click on the "Edit" dropdown of the Web Part you want to disable and choose "Close".
The web part disappears, but don't fear! It's not gone for good!
To have it back:
-> click to Add a new Web Part -> Advanced Web Part Gallery and Options.
The very first option you have is to choose among "Closed Web Parts". When clicking on that link, you will have displayed a list of all the web parts you had closed. Just add the one you want back!