Fixed APC purge when cli is disabled

Signed-off-by: Tom Wright <tom@inflatablecookie.com>