Re: 'rpm --freshen': dpkg Equivalent?

From: Niels L Ellegaard (gnalle_at_ruc.dk)
Date: 11/07/04

  • Next message: Ron Johnson: "Re: IDE not detected"
    To: debian-user@lists.debian.org
    Date: Sun, 7 Nov 2004 19:03:17 +0100
    
    

    On Sun, 07 Nov 2004 11:05:01 -0500
    Kenneth Jacker <khj@be.cs.appstate.edu> wrote:

    > How can I use 'dpkg' to install a new .deb, but *only* if the package
    > is already on a machine? With RPM, you can use the "freshen" option
    > ("-F" or "--freshen"). But how with 'dpkg'?
    >
    > In other words:
    > o If the package is already installed, then update it
    > o If the package is not installed, do nothing (do *not* install it)

    You may succeed with one of the following two suggestions (change syntax of "if" according to shell)

    if (dpkg -l package-name | grep -c ii ) apt-get install package-name;

    if (dpkg -l package-name | grep -c ii ) dpkg -i ./package.deb;

    But I still don't understand why you wish to do all this. In most cases it is easier to upgrade all packages at once:

    apt-get update && apt-get upgrade

                             Good luck

                                 Niels

     

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Ron Johnson: "Re: IDE not detected"

    Relevant Pages

    • Re: apt-get upgrade (stable to testing) 151 packages held back
      ... I just did an upgrade last week. ... sources.list do apt-get update to update the package ... > Reading Package Lists... ... To UNSUBSCRIBE, email to debian-user-request@lists.debian.org ...
      (Debian-User)
    • Re: Cleaning Up Alternatives
      ... if there's any potential for upgrade problems or some other ... The 'symlinks' package can do a search-and-destroy of dangling symlinks ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: How to PIN a package?
      ... On Monday 16 October 2006 00:26, Mirto Silvio Busico wrote: ... Now I need to avoid that this package will b e upgraded again. ... Then try and do an aptitude upgrade to see if the above took effect (it ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: How to PIN a package?
      ... I had to downgrade openoffice to version 2.0.3. ... Now I need to avoid that this package will b e upgraded again. ... to upgrade openoffice to the 2.0.4~rc3-1 version. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: Weird Upgrade procedure - Debian Testing.
      ... While trying to upgrade my Debian Testing system, it shows me a horde of ... Any chance that the to-be=fetched package is compressed, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
      (Debian-User)