If you control access to your SVN repository via Apache authentication, then you’ll undoubtedly have a password file somewhere on your system, containing the list of all the users who have an account that can access your SVN repo.

The standard file used by Subversion for this task is located at /etc/subversion/passwd.

Now that we know that, disabling, i.e. deleting a user account and thus preventing access to the SVN is relatively trivial, and achieved through the use of the Linux htpasswd function.

First, let’s grab a list of all user accounts currently with access to your SVN repository:

cat /etc/subversion/passwd

Now let’s delete a user by making use of the -D switch where usertodelete is the username of the user you wish to remove.

sudo htpasswd -D /etc/subversion/passwd usertodelete

Done. Note that the call without a switch would attempt to add a new user account, with a -m switch would prompt a password change, and with a -c switch would create a new user but overwrite your existing password file!

Nifty.