We analyze how the transient dynamics of large dynamical systems in the vicinity of a stationary point, modeled by a set of randomly coupled linear differential equations, depends on its underlying network topology. We characterize the transient response of a system through the evolution in time of the squared norm of the state vector, which is averaged over different realizations of the initial perturbation. We develop a mathematical formalism that computes this quantity for graphs that are locally treelike. We show that for unidirectional networks the theory simplifies and general analytical results can be derived. For example, we derive analytical expressions for the average squared norm for random directed graphs with a prescribed degree distribution, which exhibits a high degree of universality in the sense that the average squared norm only depends on a single parameter encoding the average interaction strength between the individual constituents. We illustrate these results with numerical experiments on large random graphs and on real-world networks.