Over the time I installed many i386 packages, which I no longer need. How can I clean up the system and stay only with the amd64 packages?
Over the time I installed many i386 packages, which I no longer need. How can I clean up the system and stay only with the amd64 packages?
The other automated solutions are dangerous and not always working (1), so here another way
or
(Try to use always and only one of the tools. Since aptitude is better when having dependency trouble, I prefer that.)
Good idea to also
and maybe
(1) The other commands also lists packages having only i386 in their name (although they are for 64bit architecture), the regular expression didn't work and dpkg shows packages which are already removed, but still have configuration files left (dpkg -l shows "rc" instead of "ii" as status).
I blitzed all my 32bit packages like this:
If they are not in your way, I would leave them where they are.
If you insist on deletion, use
dpkg -l | grep i386
to create a list of i386-packages. You can delete these after careful checking with something likesudo apt-get purge <package-name>
.The debian's multiarch guide mentions this command:
apt-get purge ".*:<arch>"
, which would look like this fori386
:You can then remove the architecture from dpkg:
In case anyone is wondering, there's a much more sane and graceful way to do this. The last previous answer hopes to do the same thing, but that search fails since architectures are not actually part of package names, except in special cases.
as root (or with sudo) run:
If you don't use aptitude over apt-get already, do. It's really excellent. You can find a list of aptitude's search terms here.
There is another way of lower risk:
This will specifically match only packages ending with
":i386"
, which is the standard naming convention for alli386
architecture Debian packages.