LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Listing Available Update Packages in Debian Systems (https://www.linuxquestions.org/questions/linux-software-2/listing-available-update-packages-in-debian-systems-940460/)

Brandon9000 04-18-2012 09:05 AM

Listing Available Update Packages in Debian Systems
 
What I have figured out to get a list of available updates for already installed packages is:

apt-get update
apt-get -s upgrade

Then I would take the line items that begin with "Inst?"

Is this the best way to do this???

pan64 04-18-2012 09:35 AM

the synaptic package manager has a "mark updates" button with a smart update feature - if you have gui

Brandon9000 04-18-2012 09:37 AM

Sorry, I should have said that I am trying to do this within a program and then parse the list.

amani 04-18-2012 09:49 AM

It depends on what you are trying to do.
If you want "that" kind of dependency management, then it should be ok for most purposes.

Brandon9000 04-18-2012 09:55 AM

Thanks. I just wondered if there was something more clever. My goal is to do something akin to Windows patch management, and the first step is to find available updates for installed software. It's harder without any central authority, as in the Windows world.

Brandon9000 04-18-2012 10:34 AM

One other thing. The meaning of the first two columns is obvious, but does the final column in parentheses show?

craigevil 04-18-2012 01:17 PM

apt-get update
apt-show-versions >> upgrade.list

will show all installed package versions and if they can be upgraded

Brandon9000 04-18-2012 01:19 PM

This is an excellent tip, but the problem is that I can't count on my customers with Debian distros having apt-show-versions installed. I need to write something that will work for all Debian users.

Brandon9000 04-24-2012 10:17 AM

Okay, in my program, I am getting the names of available updates from:

apt-get-upgrade -s | grep Inst

That works well, but how can I obtain additional information about an available (but not yet downloaded) update for an installed app?

Again, I am not doing this by hand, but programatically, and I have no control over what software is available where my program will be run, so I cannot use esoteric utilities which my users may not have.

Thanks in advance.

-Brandon

pan64 04-25-2012 01:57 AM

what information do you want to obtain and where from?

rokytnji 04-25-2012 02:00 AM

apt-cache policy (whatever package name you query goes here)

Brandon9000 04-25-2012 07:30 AM

I am obligated to report descriptive information about each available update to help the user decide whether to install it. "apt-cache policy <package>" doesn't report anything which seems to be of interest, but examining the apt-cache options, I see that "apt-cache show <package>" does.


All times are GMT -5. The time now is 01:31 PM.