Can I see updates without installing

Asked by strikerazde

Is there a way in the terminal if I can see what updates for ubuntu are available and not install them.

Having been bitten a few time by MS updates. I like to wait until they are out a week or so, then Google to see if there are any specific issues with these updates before installing them.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#1

On the one hand, you are less likely to have seriously problems from Ubuntu updates than Microsoft updates, if for no other reason than because Ubuntu updates are more often to application packages, where a problem would not break your whole system or leave large parts of it nonfunctional. On the other hand, it is certainly possible for Ubuntu updates to inadvertently produce problems, up to and including rendering your system (at least temporarily) completely unusable, and since there are far fewer users of Ubuntu than users of Windows, information to this effect might not proliferate on the Internet as quickly as with Windows. However, ultimately, unless you have enabled the -proposed or -backports repositories, any updates you receive are for the purpose of fixing security vulnerabilities or serious stability/usability problems, so the problems associated with not installing or delaying in installing them are likely to be more severe than the risk of problems arising from installing them immediately when they are made available.

If you are administering multiple computers in an environment where increased downtime translates into significant lost profits or decreased ability to achieve objectives, then like with any operating system, it is advisable to install updates on one or (better) several test machines first, test them out for a short time (for security updates this is typically hours rather than days, and sometimes shorter) to see if they cause problems, and then adopt them for the rest of the machines.

If you are running a Server machine, waiting an extra week to install a security updates, without sufficient cause to do so, could have disastrous consequences for you and anyone who would be adversely affected by a security breach (e.g., customers), and might even be considered a violation of professional ethics as an administrator. (However, I do not represent any organization of security professionals and I am not a lawyer.)

As you know, the standard way to install updates from the command-line is to first run "sudo apt-get update" to update your package information, and then to run "sudo apt-get upgrade" to upgrade packages; if packages were held back (which is usually because upgrading them would add or remove other packages), it is advisable to run "sudo apt-get dist-upgrade" to upgrade them (make sure that the removal or adding operations are OK before approving the operation). When you run "sudo apt-get upgrade" or "sudo apt-get dist-upgrade", you are prompted for whether or not you want to install the packages (unless you have reconfigured APT not to prompt you, or you are running these commands with the -y flag or equivalent). Therefore, you can just say N instead of Y when asked if you want to install them.

Alternatively, you could run a simulation of the installation process. To do this, after running "sudo apt-get update", run "apt-get -s upgrade" or "apt-get -s dist-upgrade". The omission of sudo is intentional; you do not generally need to perform simulations as root.

Revision history for this message
strikerazde (strikerazde) said :
#2

I wish I had the luxury of a lab machine, but that's just not possible at home. And it is a home network I am talking about here. That does not mean the home machines are less valuable however.

With MS, I clone my drive the 2nd Tuesday of the month just prior to the patch release. I may have to adopt the same practice here. Just not sure ubuntu patches are released on a regular or predictable schedule. So would like to know they are coming so I can make sure my backup strategy is up to date.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#3

Since it's a home network, perhaps the machine runs a graphical user interface. In that case, you have the additional option of opening up the Update Manager and checking for updates, but not installing any.

Revision history for this message
mycae (mycae) said :
#4

You can do this with aptitude.

disable the auto-updater, and then when you want to install update:

sudo aptitude update
sudo aptitude safe-upgrade

you will be presented with a list that looks liek

The following NEW packages will be installed:
foo {a}

The following packages will be upgraded:
bar bax

X packages upgraded, Y newly installed, Z to remove and W not upgraded,
Need to get aMB of archives. After unpacking BMB will be used.
Do you want to continue? [Y/n/?]

 You will of course need to install the aptitude program. Some people suggest that using apt-get and aptitude together can cause problems, but I am unclear what the problem precisely is - some claim that aptitude can uninstall system dependencies, and thus should be avoided (if mixed with apt-get), however I have usually found that aptitude does a pretty reasonable job. I am speaking anecdotally here, so take my advice with a pinch of salt.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#5

Like mycae, I have also never heard any reason articulated or evidence presented to support the idea that apt-get and aptitude should not be used on the same system. Considering that Debian's release upgrade instructions for new releases often (if not always) tell the user to use aptitude for the upgrade even if s/he had previously been using apt-get, it seems like apt-get and aptitude can be used safely on the same system.

Running "sudo aptitude safe-upgrade" is lot like "sudo apt-get upgrade". Neither will remove packages (if package removal is necessary to upgrade some package, that package will not be upgraded). However, "sudo aptitude safe-upgrade" will install packages if necessary. If you don't want to do anything (including updating already installed packages), then you could just go ahead and run "sudo apt-get dist-upgrade" and say No, which is the same sort of thing as running "sudo aptitude full-upgrade" and saying No. That will show you all the packages that would be updated, in a complete update.

Like with apt-get, aptitude can also do simulations. So you can run:

aptitude -s safe-upgrade

Or:

aptitude -s full-upgrade

If you haven't run "sudo apt-get update" or "sudo aptitude update" (they are equivalent) recently before running a simulation, you should do so (just as you would before running an actual update--to make it so that your updating process takes into account the latest packages and dependency information).

For more details about apt-get and aptitude, see their manual pages. You can read them with "man apt-get" and "man aptitude" (use the arrow keys or Page Up and Page Down or B and Spacebar to scroll up and down, press q to quit, if that doesn't work press Escape a few times then press q, everything else about reading man pages you can now learn by running "man man"). Or you can view them in Yelp (Ubuntu's help viewer). Or you can view them online at http://manpages.ubuntu.com.

Can you help with this problem?

Provide an answer of your own, or ask strikerazde for more information if necessary.

To post a message you must log in.