Re: 'rpm --freshen': dpkg Equivalent?
From: Niels L Ellegaard (gnalle_at_ruc.dk)
Date: 11/07/04
- Previous message: Ron Johnson: "Re: 'rpm --freshen': dpkg Equivalent?"
- In reply to: Kenneth Jacker: "'rpm --freshen': dpkg Equivalent?"
- Next in thread: Kenneth Jacker: "Re: 'rpm --freshen': dpkg Equivalent?"
- Reply: Kenneth Jacker: "Re: 'rpm --freshen': dpkg Equivalent?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Ron Johnson: "Re: 'rpm --freshen': dpkg Equivalent?"
- In reply to: Kenneth Jacker: "'rpm --freshen': dpkg Equivalent?"
- Next in thread: Kenneth Jacker: "Re: 'rpm --freshen': dpkg Equivalent?"
- Reply: Kenneth Jacker: "Re: 'rpm --freshen': dpkg Equivalent?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|