Hi, here is a simple question, how can I get a list of package that need to be upgraded. I want to use it in a cron script so It have to just list package, not interact with a shell.
Thanks!
Hi, here is a simple question, how can I get a list of package that need to be upgraded. I want to use it in a cron script so It have to just list package, not interact with a shell.
Thanks!
No, I want to do it myself, it is why I need a packages list. Diong an automiatic update is not hard at all, it look like
apt-get update
apt-get upgrade --force-yes
but I want to use a for loop like
apt-get update
for i in (the command)
my script
done
Yes, but it still ask the [Y/N] question, I need to disable it if I want to get the packae list, thats my problem here.
Okay, but if you run one script which nightly does :
sudo apt-get -d dist-upgrade > /tmp/output.txt
then you can work in another script while extracting the text in /tmp/output.txt and use both in a cronjob.
Think of tools like awk and sed.
Perhaps this idea is too difficult to achieve, but it's an idea.
Not dificult, just not practicable, it is a hack and is really cheap, this is for production, so even having to deal with the header and end of page feel cheap for a production script. I am sure there is a way somehow. After all how many apps have that list, I don't think they parsed apt-get.
Install:
Then run:Code:sudo apt-get install apt-show-versions
Shows what packages in your system may be updated. The -u option displays a list of upgradeable packages.Code:$ apt-show-versions -u login/intrepid-security upgradeable from 1:4.1.1-1ubuntu1.1 to 1:4.1.1-1ubuntu1.2 passwd/intrepid-security upgradeable from 1:4.1.1-1ubuntu1.1 to 1:4.1.1-1ubuntu1.2
HP Pavilion DV9608nr
Dual Boot | Compiz-Check | Partitioning | Compiz Plugins | bash_aliases | Installing nvidia drivers | using dd
| gparted live cd | Google cheat sheet | Unix/Linux cheatsheet | intrepid 8.10 live cd | Uninstall Ubuntu
Thanks! It work perfectly
Bookmarks