Files
literate-dotfiles/maintenance.org

1.7 KiB

#+TITLE:System maintenance

https://wiki.archlinux.org/title/System_maintenance

Update

System packages

To check packages to update:

paru -Qu

And then to perform the update:

paru

NPM (nodejs)

First update npm itself

sudo npm install npm@latest -g

Then, we can list outdated packages:

npm outdated -g --depth=0

And finally perform the update:

sudo npm update -g

PIP (python)

/usr/bin/python3 -m pipx upgrade-all

Emacs and Vim

Update Doom emacs with:

doom up

And Vim packages with:

nvim -c PlugUpgrade -c PlugUpdate

Check problems in the system

First check for failed services:

systemctl --failed

Same for user services:

systemctl --user --failed

Look for errors in the logs:

sudo journalctl -p 3 -b

Check orphan and dropped packages

Run the following to list all orphan packages:

pacman -Qtdq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'

Then, either remove the unused packages or set the package to "explicitly installed" with:

sudo pacman -D --asexplicit package_name

Use the ancient-packages (link) command to list dropped packages (packages may longer in the remote repositories, but still on the local system):

ancient-packages