LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-18-2012, 09:05 AM   #1
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Rep: Reputation: Disabled
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???
 
Old 04-18-2012, 09:35 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,778

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
the synaptic package manager has a "mark updates" button with a smart update feature - if you have gui
 
Old 04-18-2012, 09:37 AM   #3
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
Sorry, I should have said that I am trying to do this within a program and then parse the list.
 
Old 04-18-2012, 09:49 AM   #4
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
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.
 
Old 04-18-2012, 09:55 AM   #5
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-18-2012, 10:34 AM   #6
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
One other thing. The meaning of the first two columns is obvious, but does the final column in parentheses show?
 
Old 04-18-2012, 01:17 PM   #7
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
apt-get update
apt-show-versions >> upgrade.list

will show all installed package versions and if they can be upgraded
 
Old 04-18-2012, 01:19 PM   #8
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-24-2012, 10:17 AM   #9
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-25-2012, 01:57 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,778

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
what information do you want to obtain and where from?
 
Old 04-25-2012, 02:00 AM   #11
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,095
Blog Entries: 21

Rep: Reputation: 3473Reputation: 3473Reputation: 3473Reputation: 3473Reputation: 3473Reputation: 3473Reputation: 3473Reputation: 3473Reputation: 3473Reputation: 3473Reputation: 3473
apt-cache policy (whatever package name you query goes here)
 
Old 04-25-2012, 07:30 AM   #12
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Brandon9000; 04-25-2012 at 07:31 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script to update Debian type systems, a couple of questions k3lt01 Programming 24 11-15-2011 08:10 PM
Make slackpkg prefer /extra over /slackware when listing packages to update rignes Slackware 1 06-02-2007 06:00 PM
LXer: Make your own packages for Debian-based systems LXer Syndicated Linux News 0 02-23-2007 03:31 AM
how to update packages in debian? g_srinivas Linux - Newbie 5 02-11-2006 06:45 AM
Debian unstable - unfixable broken packages after update. Imek Debian 4 07-20-2005 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration