Okay, I fixed the /etc/init.d/couchdb script issue.
I also seemingly fixed the `apt-get purge couchdb` problem, but sometimes it still fails. The issue is `/etc/init.d/couchdb stop` is async, so when couchdb.postrm tries to deluser couchdb, that user still has processes running, making deluser and the couchdb.postrm script fail.
Okay, I fixed the /etc/init.d/couchdb script issue.
I also seemingly fixed the `apt-get purge couchdb` problem, but sometimes it still fails. The issue is `/etc/init. d/couchdb stop` is async, so when couchdb.postrm tries to deluser couchdb, that user still has processes running, making deluser and the couchdb.postrm script fail.