Installing .deb packages with apt-get

Derek Broughton news at
Sun May 20 16:26:49 UTC 2007

Dotan Cohen wrote:

> On 18/05/07, Derek Broughton <news at> wrote:

>> I've fairly often managed to confuse apt to the point where "aptitude
>> install" (or "apt-get -f install", if you really prefer) causes it to
>> want
>> to back out much of my system.  After a few hours of
>> remove/install/remove/reinstall, it starts to behave.  That won't happen
>> if you stick to genuine ubuntu repositories and never install anything
>> directly via dpkg, ime.
> Well, I don't intend to stick to official repos and not install .debs.
> That's the point of this thread: How to install local .debs. So then I
> can expect apt to get confused. Not apt's fault, but mine. However,
> that means that I need to be careful with it like I'm now careful with
> yum. Thus, I need to run a simulation before every operation,
> something that does NOT need to be done with yum because yum tells the
> user what it is going to do before doing it, and asks for
> confirmation.

Yes and no (I'm getting pretty good at that answer today!)

You don't need to do a simulation.  aptitude or apt-get will always tell you
what's going to be removed or added before prompting you for a yes or no
response, unless you use the -y option.  Also, either one with
the "upgrade" option won't remove anything.  But yes, it's not uncommon to
find a non-ubuntu .deb package forcing you to remove ubuntu packages.  If
that happens, you're probably best off to use "apt-get source" to get the
source package and build it to match ubuntu.

More information about the ubuntu-users mailing list