How do I remove all i386 architecture packages from my Debian installation?
I am answering my own question after gathering important information from other blog posts.
- Show what foreign architectures are installed:
dpkg --print-foreign-architectures
- Might show:
i386
- Might show:
- Remove all
i386
packages:apt-get purge ".*:i386"
- Note: The
purge
keyword (instead ofremove
) removes all configuration files associated with the packages you're uninstalling. (Thanks PCGuyIV!)
- Note: The
- Now you can remove the
i386
architecture:dpkg --remove-architecture i386
I would use "purge" instead of "remove".
~# apt-get purge ".*:i386"
~# dpkg --remove-architecture i386
The "purge" keyword removes all configuration files associated with the packages you're uninstalling.
$ sudo apt remove `dpkg --get-selections |grep i386 |awk '{print $1}'`
$ sudo dpkg --remove-architecture i386