Skip to content

Instantly share code, notes, and snippets.

@remlapmot
Last active January 2, 2025 14:02
Show Gist options
  • Save remlapmot/1db4f2c27880ec3df8f17c15d2e91f07 to your computer and use it in GitHub Desktop.
Save remlapmot/1db4f2c27880ec3df8f17c15d2e91f07 to your computer and use it in GitHub Desktop.
Update Ubuntu apt packages and snaps
#!/usr/bin/env bash
sudo apt-get update && sudo apt-get --with-new-pkgs upgrade -y
sudo apt autoremove -y
sudo snap refresh
# remember to amend Ubuntu codename in repos URL
sudo R -e 'options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"]))); update.packages(repos = "https://p3m.dev/cran/__linux__/jammy/latest", ask = FALSE)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment