Plans to demolish former council offices after the site was sold to a supermarket chain have been given the go-ahead.