Use 'desultorily' to describe an action done without purpose or clear intention, often aimlessly. He wandered around the town desultorily, with no destination in mind.
Pro Tip 2/3
Subtle Disinterest
'Desultorily' often hints at a very mild, unobvious lack of engagement or concern. He engaged in the conversation desultorily, not really interested in the topic.
Pro Tip 3/3
Not Random
Despite meaning 'aimlessly', 'desultorily' doesn’t imply randomness, but a lack of focus. She browsed the shelves desultorily, picking up books and putting them back without much thought.