Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Smart update via command line?

  1. #11
    Join Date
    May 2010
    Location
    Thessaloniki
    Beans
    216
    Distro
    Ubuntu

    Re: Smart update via command line?

    Quote Originally Posted by towheedm View Post
    I believe the -s option should do it. Have never used it though.
    Thumbs up, thanks.

  2. #12
    Join Date
    Oct 2008
    Beans
    3

    Re: Smart update via command line?

    I have tried to upgrade from Ubuntu 10-04 to 10-10 and it seems to crash when it gets to:
    Calculating upgrade... Failed
    The following packages have unmet dependencies:
    libdrm-nouveau1: Breaks: xserver-xorg-video-nouveau (< 1:0.0.16) but 1:0.0.15+git20100219+9b4118d-0ubuntu5 is to be installed
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

    I tried the upgrade from the command line as suggested but it also failed.

    Any suggestions what I need to install and how>

  3. #13
    Join Date
    Jul 2008
    Beans
    39
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Smart update via command line?

    apt-get clean then redo your command. Do you have the same error?

  4. #14
    Join Date
    Dec 2007
    Location
    Austin, Texas USA
    Beans
    259
    Distro
    Ubuntu

    Re: Smart update via command line?

    Thanks for the thread and the QA. I was just wondering whats the difference between apt-get update and apt-get upgrade?
    When I use apt-get update it seems it only downloads the update files but it does not install them? Is that true?

    I really want to stay away from (GUI) Update Manager since I have had few bad experiences with it before in fact this is a fresh install because the update manager crashed my ubuntu install 3 or 4 times & the last time I used it, I could not boot at all and lost a lot of files.
    So basically I want to do the same thing in the command line.

  5. #15
    Join Date
    May 2008
    Location
    Poland
    Beans
    17
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Smart update via command line?

    Well, depends on what you mean by "update files". In fact, what apt-get update does is downloading lists of new available packages from all repos (set in /etc/apt/sources.list) to find out whether any of the packages installed on your computer needs update or not. It does not 'download' anything apart from that lists.
    When you do apt-get upgrade, that is the moment when you download actual packages, and install them. It asks you if you want to download & install before it does anything, so if you short of fast connection, you can just see the list and exit.
    regards

  6. #16
    Join Date
    Aug 2005
    Beans
    8

    Re: Smart update via command line?

    I know this is an old thread - but I have a question about using "apt-get update" and "apt-get upgrade" -

    What if I have compiled some apps from source?

    Prior to compiling them, I ran "apt-get update" and "apt-get upgrade", but in the time since there are new packages that have updates.

    Will updating them break my compiled applications?

    Thanks.

  7. #17
    Join Date
    Dec 2009
    Beans
    286

    Re: Smart update via command line?

    There is no simple way to answer this. Depending on how the app was compiled, it may or may not.

    'apt-get upgrade' upgrades packages from the repos listed in your /etc/apt/sources.list files. These packages are by default built with 'prefix=/usr'. Most packages you build from source will by default have prefix set to /usr/local. In this case, installing your newly built app will not remove any existing versions and issuing an apt-get upgrade will upgrade only a previously installed version leaving the version you built intact.

    If you specified 'prefix=/usr' when you built your app, then if it's older than the one in the repo, it will be upgraded when you issue the apt-get upgrade command.

    There may be a little more to it than that, nut that's it in a nutshell.

    Remember also, there is a difference between apt-get upgrade and apt-get dist-upgrade, see the apt-get man pages for details.

    To prevent a package from being upgraded, you can place a 'hold' on it. You can place a 'hold' on packages with the dpkg --set-selections command:
    Code:
    echo "pkg-name hold" | sudo dpkg --set-selections
    And to remove the hold:
    Code:
    echo "pkg-name install" | sudo dpkg --set-selections
    To see the status of all packages:
    Code:
    dpkg --get-selections
    The Definitive Guide to Theming GRUB2 is here.

  8. #18
    Join Date
    Aug 2005
    Beans
    8

    Re: Smart update via command line?

    Hi Towheedm,

    Thank you very much for your help.

    OK so if I compiled Wireshark from source....and used a prefix of /usr/local....

    And then later on there was an update for one of Wireshark's dependencies - like libpcap - I would be ok doing "apt-get update" and "apt-get upgrade".....(I know "apt-get dist-upgrade is a different animal).

    But if I installed Wireshark into /usr, then I better put a hold on libpcap and any other wireshark dependencies????

    Mike

  9. #19
    Join Date
    Dec 2009
    Beans
    286

    Re: Smart update via command line?

    But if I installed Wireshark into /usr, then I better put a hold on libpcap and any other wireshark dependencies????
    I'm not familiar with Wireshark, but keep in mind, it may have dependencies that are also dependencies of other applications. So placing a hold on those, may also prevent those other apps from being updated.
    The Definitive Guide to Theming GRUB2 is here.

  10. #20
    Join Date
    May 2012
    Beans
    1

    Re: Smart update via command line?

    Quote Originally Posted by Jaramia View Post
    Hey, I was looking all over the place for these commands. I've been stuck with a fresh install that keeps crashing for what seem to be hardware related problems.

    It was nice to have the necessary commands spelled out. Something I'd would like to see in the documentation. (I couldn't find it if it was there...)

    Thanks
    I don't know if this has been added to the documentation yet (after 5 years), but I think it would make sense that the message when logging in over SSH, that currently reads

    "3 packages can be updated. update is a security update."

    Would include something like

    "type: 'sudo apt-get update; sudo apt-get dist-upgrade' to perform the update"

    similar to the message you get when you enter a command included in a package that you haven't got installed.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •