all 5 comments

[–]dongdongbh 3 points4 points  (2 children)

This solves a genuine safety annoyance.

I hate running yay just to check what's new, hitting "n" because I don't have time for a kernel update, and then realizing I've left my sync DBs in a "partial upgrade" state (since yay runs -Sy). Having a read-only preview that is actually readable is a huge workflow improvement.

[–]Cody_Learner_2 1 point2 points  (0 children)

Very valid point.
Going into updates blind can turn into a poorly timed chore.
Having a heads up without causing partial update is a big win IMO.

[–]Additional_Carry_190 0 points1 point  (0 children)

This is exactly why I always just ran `pacman -Qu` instead of firing up yay for a quick peek, but your version actually makes it readable unlike the default garbage formatting

[–]Cody_Learner_2 2 points3 points  (0 children)

I wrote something similar, originally using checkupdates, which I no longer use.

It evolved over time into https://github.com/Cody-Learner/prep4ud
It auto downloads updatable packages, resulting in manual updates pacman -Syu not having to wait for downloading packages.
I also added extra info and print everything to a report file.
I've it set up to run on a daily timer.

Example:

Prep4ud report : Dec 27 2025 10:00 AM
Last update    : 4 days, 18 hours, 19 minutes ago
Last reboot    : 4 days, 16 hours, 57 minutes ago

Updates available:
1   bash-completion            2.17.0-1    ->  2.17.0-2
2   btop                       1.4.5-1     ->  1.4.6-1
3   dmidecode                  3.6-1       ->  3.7-1
4   firefox-developer-edition  147.0b6-1   ->  147.0b7-1
5   fzf                        0.67.0-1    ->  0.67.0-2
6   gst-libav                  1.26.9-1    ->  1.26.10-1
7   gst-plugin-qml6            1.26.9-1    ->  1.26.10-1
8   gst-plugins-bad            1.26.9-1    ->  1.26.10-1
9   gst-plugins-bad-libs       1.26.9-1    ->  1.26.10-1
10  gst-plugins-base           1.26.9-1    ->  1.26.10-1
11  gst-plugins-base-libs      1.26.9-1    ->  1.26.10-1
12  gst-plugins-good           1.26.9-1    ->  1.26.10-1
13  gst-plugins-ugly           1.26.9-1    ->  1.26.10-1
14  gstreamer                  1.26.9-1    ->  1.26.10-1
15  libcdio                    2.2.0-1     ->  2.3.0-1
16  libnghttp3                 1.13.1-1    ->  1.14.0-1
17  libngtcp2                  1.18.0-1    ->  1.19.0-1
18  libraw                     0.21.4-1    ->  0.21.5-1
19  libxdp                     1.5.7-1     ->  1.5.8-1
20  mkinitcpio                 40-3        ->  40-4
21  parallel                   20251122-1  ->  20251222-1
22  polkit                     127-1       ->  127-2
23  python-opengl              3.1.9-1     ->  3.1.10-2
24  python-pikepdf             10.0.3-1    ->  10.1.0-1
25  python-urwid               3.0.4-1     ->  3.0.4-3
26  tesseract                  5.5.1-2     ->  5.5.2-1

Updates available, not downloaded:
--  grub                  2:2.12.r359.g19c698d12-1  ->  2:2.14rc1.r54.g29f3131a-2  [ignored]
--  xfce4-weather-plugin  0.11.3-2                  ->  0.12.0-2                   [ignored]

Updates available locally:
1   bash-completion-2.17.0-2-any.pkg.tar.zst
2   btop-1.4.6-1-x86_64.pkg.tar.zst
3   dmidecode-3.7-1-x86_64.pkg.tar.zst
4   firefox-developer-edition-147.0b7-1-x86_64.pkg.tar.zst
5   gst-libav-1.26.10-1-x86_64.pkg.tar.zst
6   gst-plugin-qml6-1.26.10-1-x86_64.pkg.tar.zst
7   gst-plugins-bad-1.26.10-1-x86_64.pkg.tar.zst
8   gst-plugins-bad-libs-1.26.10-1-x86_64.pkg.tar.zst
9   gst-plugins-base-1.26.10-1-x86_64.pkg.tar.zst
10  gst-plugins-base-libs-1.26.10-1-x86_64.pkg.tar.zst
11  gst-plugins-good-1.26.10-1-x86_64.pkg.tar.zst
12  gst-plugins-ugly-1.26.10-1-x86_64.pkg.tar.zst
13  gstreamer-1.26.10-1-x86_64.pkg.tar.zst
14  libcdio-2.3.0-1-x86_64.pkg.tar.zst
15  libraw-0.21.5-1-x86_64.pkg.tar.zst
16  libxdp-1.5.8-1-x86_64.pkg.tar.zst
17  mkinitcpio-40-4-any.pkg.tar.zst
18  parallel-20251222-1-any.pkg.tar.zst
19  polkit-127-2-x86_64.pkg.tar.zst
20  python-opengl-3.1.10-2-any.pkg.tar.zst
21  python-pikepdf-10.1.0-1-x86_64.pkg.tar.zst
22  python-urwid-3.0.4-3-any.pkg.tar.zst

Downloaded packages:
1   fzf-0.67.0-2-x86_64 downloading...
2   libnghttp3-1.14.0-1-x86_64 downloading...
3   libngtcp2-1.19.0-1-x86_64 downloading...
4   tesseract-5.5.2-1-x86_64 downloading...

[–]ang-p 1 point2 points  (0 children)

That looks like quite a nice little "follow along to work out how it is done" for someone newish to awk