Identifying useless vertices in a directed graph
Let $n$ and $m$ be the number of vertices and edges of your input graph $G = (V,E)$, respectively.
You can find all useless vertices in time $O(n+m)$.

You can discover the set $S$ all vertices reachable by at least one source in $O(n + m)$ overall time.

You do this by either:


running one visit from each of the input vertices, marking discovered vertices as visited, and taking care of not revisiting already visited vertices; or
adding a dummy "super-source" vertex $s$ with an outgoing edge towards every input vertex in $G$, and then running a visit from $s$.


By using the same technique on the reversed graph $G^R$, you can find the set $T$ of all vertices that are reachable from an output vertex in $G^R$. In other words a vertex $v$ can reach an output vertex in $G$ iff $v \in T$.

The set you are looking for is then $V \setminus (S \cap T)$.