You can pin versions in brew (brew pin <package>) to prevent upgrades.
You can install specific versions, but it requires some gitfu - you need to uninstall, find the brew commit where the package is at the version you want, then install from that specific git blob.
Can you pin versions in apt? Last time I checked it involved a lot of work and swearing, but that might have improved lately.
Not really, it was pretty verbose, but wasn't hard. Pinning is for setting package priority between multiple repos.
What you're looking apt is apt-holding:
apt-mark hold libxfont1
That been around since 2013 IIRC. And there was dpkg way of doing it before.
It’s also just so slow to update if it’s been more than like an hour since you last updated, the way it uses one big git repo under the hood is just chaos.