I'm feeling a little virtuous at the moment. Worik on the DUNLug mailing list asked how to delete a user and eradicate all their files. I said “ deluser –remove-all-files ”. Worik said that didn't work.
Rather than assume that he'd made a mistake, I tried it. It doesn't work, just like he said. A bug!
We're both using Ubuntu, so I turned to the Launchpad and checked for bugs on the adduser package. There was a “fixed” bug that said it fixed a specific failure, the inability to remove the Ubuntu default symlink ~/Examples, in 2006. I checked my test machine, and this was exactly the problem I was seeing – everything except ~/Examples had been removed OK.
Further testing showed that the --remove-home option worked just fine. Hmmm …
Luckily, deluser isn't an executable, it's a perl script. So I was able to do some digging, even though my perl is quite rusty (thanks http://perldoc.perl.org/ !) I added some debug comments and managed to categorise the problem … which lead to a fix … and a small patch file, all submitted onto the launchpad bug.
Usually I stop at the categorise-and-report stage. It's nice to be able to propose a fix too :-)