Skip to content

Instantly share code, notes, and snippets.

@jpyper
Last active April 22, 2026 20:40
Show Gist options
  • Select an option

  • Save jpyper/0d084d61342393c35b30e76048601bf8 to your computer and use it in GitHub Desktop.

Select an option

Save jpyper/0d084d61342393c35b30e76048601bf8 to your computer and use it in GitHub Desktop.
RustUp Automatic Update Service

rustup-update systemd user timer

Place the two unit files in ~/.config/systemd/user/ and enable the timer:

mkdir -p ~/.config/systemd/user cp rustup-update.service rustup-update.timer ~/.config/systemd/user/ systemctl --user daemon-reload systemctl --user enable --now rustup-update.timer

Notes:

  • The service uses /usr/bin/rustup (package manager installed). If you installed rustup to your home (cargo), edit ExecStart or PATH.
  • --no-self-update prevents rustup from self-updating; keep it if you manage rustup with package manager.
  • Check status and logs with: systemctl --user status rustup-update.timer journalctl --user -u rustup-update.service
[Unit]
Description=Update Rust toolchains with rustup
Documentation=man:rustup(1)
[Service]
Type=oneshot
Environment=PATH=%h/.cargo/bin:/usr/local/bin:/usr/bin
ExecStart=/usr/bin/rustup update --no-self-update
Nice=10
IOSchedulingClass=best-effort
IOSchedulingPriority=7
[Unit]
Description=Daily run of rustup update
[Timer]
OnCalendar=daily
RandomizedDelaySec=1h
Persistent=true
OnBootSec=5min
[Install]
WantedBy=timers.target

Comments are disabled for this gist.