How to get rid of output in nlsolve?

Well - redirect_stdout just returns whatever the given function returns, so that’s why it’s probably being printed. The REPL just displays the value it was given, calling show:

julia> redirect_stdout(() -> 1, devnull)
1                                       

Would explain why everything inside nlsolve is swallowed, but not the summary.