Keeping your software up to date is important to stay safe. I recently watched Hacker - We get you within 5 minutes!, which talks about security mistakes people and companies make. So keep your software up to date!
I also only install what I really need to reduce the overall attack surface. That doesn’t mean I never install things I’ll only use temporarily. But I try to notice when I’m not using something anymore and remove it.
Homebrew helps me keep track of the programs on my computer. It has a useful command that checks what I have installed. Since I use fish shell, the command below is written in fish syntax:
for pkg in (brew list)
set deps (brew uses --installed $pkg)
if test (count $deps) -eq 0
echo "$pkg is not used by any installed package"
else
echo "$pkg is required by: $deps"
end
end
This checks the dependencies between installed programs. It finds “orphan” packages - packages that nothing else needs. You can review it and decide which ones to remove. Here’s what the output might look like:
ansible is not used by any installed package
brotli is required by: mongosh node
certifi is required by: ansible
cryptography is required by: ansible
docker is not used by any installed package
flac is not used by any installed package