<p>We consider random walks on several classes of graphs and explore the likely structure of the vacant set, i.e. the set of unvisited vertices. Let Γ(<em>t</em>) be the subgraph induced by the vacant set of the walk at step <em>t</em>. We show that for random graphs <em>G</em><sub><em>n</em>,<em>p</em></sub> (above the connectivity threshold) and for random regular graphs <em>G</em><sub><em>r</em></sub>,<em>r</em> ≥ 3, the graph Γ(<em>t</em>) undergoes a phase transition in the sense of the well-known ErdJW-RSAT1100590x.png -Renyi phase transition. Thus for <em>t</em> ≤ (1 - <em>ε</em>)<em>t</em><sup>*</sup>, there is a unique giant component, plus components of size <em>O</em>(log <em>n</em>), and for <em>t</em> ≥ (1 + <em>ε</em>)<em>t</em><sup>*</sup> all components are of size <em>O</em>(log <em>n</em>). For <em>G</em><sub><em>n</em>,<em>p</em></sub> and <em>G</em><sub><em>r</em></sub> we give the value of <em>t</em><sup>*</sup>, and the size of Γ(<em>t</em>). For <em>G</em><sub><em>r</em></sub>, we also give the degree sequence of Γ(<em>t</em>), the size of the giant component (if any) of Γ(<em>t</em>) and the number of tree components of Γ(<em>t</em>) of a given size <em>k</em> = <em>O</em>(log<em>n</em>). We also show that for random digraphs <em>D</em><sub><em>n</em>,<em>p</em></sub> above the strong connectivity threshold, there is a similar directed phase transition. Thus for<em>t</em> ≤ (1 - <em>ε</em>)<em>t</em><sup>*</sup>, there is a unique strongly connected giant component, plus strongly connected components of size <em>O</em>(log <em>n</em>), and for <em>t</em> ≥ (1 + <em>ε</em>)<em>t</em><sup>*</sup>all strongly connected components are of size <em>O</em>(log <em>n</em>).</p>