11

I used this command to add i386 arch:

sudo dpkg --add-architecture i386

And then immediately after without installing any packages I tried to remove the i386 arch like so:

sudo dpkg --remove-architecture i386

And i got the error:

dpkg: error: cannot remove architecture 'i386' currently in use by the database

Solutions I have seen so far involve removing i386 packages, I haven't installed any, the ones that are installed are vital to the functioning of the OS. What do I do?

EDIT, PLEASE READ THE FOLLOWING TO AVOID DESTROYING YOUR OS:

Turns out that 64-bit Linux OSes already include the i386 arch, so the command sudo dpkg --add-architecture i386 didn't really do anything.

6

On an amd64 installation (64-bit PC), the i386 architecture (32-bit PC) is active by default. From your list, it looks like you just had the 32-bit packages used for Wine. Wine needs a bunch of 32-bit libraries to run 32-bit Windows applications. You won't be able to remove the i386 architecture unless you uninstall the 32-bit Wine. But there's no point in doing this: there's nothing wrong with having the i386 architecture enabled.

23

Run

dpkg --get-selections | awk '/i386/{print $1}'

And then if happy with them being removed, run

apt-get remove --purge `dpkg --get-selections | awk '/i386/{print $1}'`

And then retry the

dpkg --remove-architecture i386
  • 2
    Thank you for this, very useful! Do you know if this is safe to do on Ubuntu 16.04 64-bit? I'm asking because I see a long list of packages and am worried that something might go wrong if I remove them all – sunyata Sep 6 '17 at 19:58
  • 2
    @sunyata if your objective is to remove the i386 from your system, then that's the way: remove all i386 packages and then remove the architecture. – Braiam Apr 15 '18 at 0:10
  • That helped me. After I removed the i386 I managed to update firefox. Thank you. – makkasi Dec 4 at 12:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.