You may be running a campaign in which murderhoboes aren't really a good fit for the kind of game you want to play. How do you discourage that before it becomes a problem?
- Talk to your players and explain what kind of game you're interested in providing. Did you know that most play style dissonance can be solved by just talking to each other like human beings? Crazy!
- It's great when players have ambitions for their characters, but it's easy to make clear in play that random acts of violence are a poor way to fulfill those ambitions. Make sure there are different, and better, approaches within the shared fiction for accomplishing a character's goals. You can also discourage murderhobo-ism by leveraging real consequences for antisocial behavior within the fictive world of the game itself.
- Root the characters in the setting so they are a part of it, instead of being eternal outsiders. This "rooting" could be a "starting town" that you focus on to discourage the violent vagabonds archetype, or you could lean on the characters' backstories (like those generated by 5e D&D's backgrounds) to give them a defined place within the campaign world.
- Give the characters (and players) things to care about. These attachments could be NPCs, organizations, goals, causes, etc. If they feel connected to the setting, or even protective of it, they will be less likely to draw steel as the solution to every problem. Offer a variety of things in the game that a player might take an interest in; take note when a player gets into one of the attachments on offer and make that a more prominent facet of the game.
- Murderlooting at every opportunity doesn't have to provide mechanized benefits. Actions that are rewarded on a mechanical level are incentivized; remove the incentive and you remove the impetus for taking that course of action.