I think you used to be able to get rid of your companions by retiring, but that doesn't work anymore.
I tried with my last adventurer's crossbowwoman, who became the definition of "space-filler". For a while she was pretty kickass, causing a lot of fatal or debilitating injuries, but then she got her leg cut off at the shin, greatly reducing her speed, and even more irritating ran out of bolts. Since I couldn't given her any of the bolts or crutches I found, she would literally just stand at the back while everyone else fought. She survived an ambush and like four bandit raids like that, and even outlived my adventurer (though according to Legends, she was killed with the rest of the group after that).