In this paper, we analyze the optimal policy for a risk averse agent who wants to sell a large block of shares of a risky security in the presence of price impact and transactions costs. Our framework reduces to the standard Merton portfolio problem in the absence of any market frictions. Optimal liquidation results in revenue distributions which are substantially different from those generated by a naive strategy. The main tradeoff involves choosing between revenue distributions which have high means versus those which have low variances. Furthermore, our results suggest that the effective liquidity of a security depends on its return distribution and on the characteristics of the agent carrying out the trade, as well as on the price impact function.