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??? |
the synaptic package manager has a "mark updates" button with a smart update feature - if you have gui
|
Sorry, I should have said that I am trying to do this within a program and then parse the list.
|
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. |
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.
|
One other thing. The meaning of the first two columns is obvious, but does the final column in parentheses show?
|
apt-get update
apt-show-versions >> upgrade.list will show all installed package versions and if they can be upgraded |
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.
|
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 |
what information do you want to obtain and where from?
|
apt-cache policy (whatever package name you query goes here)
|
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. |