[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DPKG search by architecture



Jordon Bedwell wrote:
> I can't for the life of me remember how to do it outside of CentOS, but  
> we want to remove 32bit libs and simply leave a plain 64bit system,

Debian isn't like CentOS and isn't a "dual" architecture system in the
same way.  Instead it is more of a single architecture system but with
the added capability that if the kernel supports it additional
libraries can be installed and multiple architectures run.  So if you
are running an amd64 system you are already running a plain 64-bit
system.

> yes I removed ia32-libs

That is really all that you need to do.

> but there are still some remains so does anybody remember how to
> search for packages by architecture?

If a package is "removed" the configuration files are left behind.  If
the package is "purged" then along with the normal files the
configuration files are removed too.

So the first step would be to see if the package is removed or
purged.  List the status and look.  The first two letters will give
the package status.

  $ dpkg -l ia32-libs

Does that say "rc" in the first column?

  $ dpkg -L ia32-libs

Are there files listed for that package?  If so then you can "purge"
the package and remove the associated configuration files.

  $ sudo dpkg --purge ia32-libs

The configuration files are left installed when a package is removed
so that it is easy to flip-flop between two alternative packages.  For
example you might have Postfix installed and want to switch to Exim
(or the reverse) briefly, or any other set of alternative packages.
The configuration files are not trivial and if the configuration files
were removed then it would be difficult to return to the previous.
But with the configuration files left in place it is easy to install
an alternative, test something, then install again the previous and
with all of the configuration files in place.  Very nice!

I didn't look but I doubt ia32-libs has very much in terms of
configuration files.  So that seems safe to purge.

I am thinking that perhaps you are seeing other files and not knowing
what package they belong to.  In that case you can ask dpkg to search
for them.

  $ dpkg -S /emul/ia32-linux/lib/ld-2.7.so
  libc6-i386: /emul/ia32-linux/lib/ld-2.7.so

In which case you would know that libc6-i386 is the package containing
the files you were interested in.

BTW the dlocate package optimizes this search.  If you run dpkg -S
more than twice a year you will probably tire of the time it takes to
search the database desire the dlocate command instead.  It keeps an
index and returns this information virtually immediately.  And also
returns other search information too.

  $ sudo apt-get install dlocate
  $ dlocate /emul/ia32-linux
  ...

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: