Score:0

How to find upgradable packages along with their release date in Ubuntu using commands?

kp flag
apt-get update > /dev/null
apt list 2> /dev/null --upgradable | awk -F/ 'NF>1 { print $1","$2 }'

These 2 commands give the missing patches but I cannot find the release dates of missing patches along with them.

How do I get the release dates of the missing patches?

Rishon JR avatar
pl flag
You can find most of the info you want [here](https://wiki.ubuntu.com/Releases).
user535733 avatar
cn flag
This seems like a potential [XY Question](https://en.wikipedia.org/wiki/XY_problem). What is the problem or issue that has led you to needing a "*release date of missing patches*"? Is this a security-related question?
Abhishek Chaurasia avatar
kp flag
It's for all missing patches including missing patches
Score:1
pl flag

Using apt list --upgradable you can get the name of packages and their versions. Once you have that, you can grab the changelog which will include the date. So for example on Ubuntu 23.04 (Lunar) a new build of nodejs was released recently. Using the apt changelog command you can see what's in it, and when it was uploaded.

alan@ziggy:~$ apt changelog nodejs | head
Get:1 https://changelogs.ubuntu.com nodejs 18.13.0+dfsg1-1ubuntu1 Changelog [117 kB]
nodejs (18.13.0+dfsg1-1ubuntu1) lunar; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - Use gold linker on arm64 to fix a link failure
    - Still use Ubuntu openssl patch and approach, the Debian one
      makes testsuite fail.
    - Fix offset by one in one new test

 -- Gianfranco Costamagna <locutusofborg@debian.org>  Fri, 03 Feb 2023 23:40:23 +0100

Another source of data is the launchpad page for a project. So taking the example above of nodejs 18.13.0+dfsg1-1ubuntu1 we can find at https://launchpad.net/ubuntu/+source/nodejs/18.13.0+dfsg1-1ubuntu1 (which is an easy URL to craft if you have the package name and version) that the actual release date that version of nodejs was published to universe was 2023-02-17.

A further source of information is the (release)-changes mailing list. So for Ubuntu Lunar you'll find the lunar-changes mailing list at https://lists.ubuntu.com/archives/lunar-changes/. Every time a package is published, there's an email along with it.

So for our example above here we can see the above package accepted into lunar-proposed pocket on the 3rd Feb. The email contents also has a link to the above launchpad page, completing the circle.

Artur Meinild avatar
vn flag
Using this expression `apt list --upgradeable | tail -n+2 | awk -F '/' '{print $1}'` will return a list containing only the package names, which can then be processed in a script..
Abhishek Chaurasia avatar
kp flag
I need a release date along with the missing patches name
pl flag
What do you need the release date for? There's the date it was pushed in the changelog.
Abhishek Chaurasia avatar
kp flag
i want to restrict the patches by release dates
pl flag
That will require a more complex setup, perhaps running your own mirror, and deferring updates to it. Also, the archive only keeps the last two versions of any package, so you can't easily arbitrarily go back to any random point in time. You'd need to either build the packages yourself, or get them from launchpad.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.