I added foreign architecture i386 to my Debian amd64 installation. How do I remove it? When I try this command: dpkg --remove-architecture i386, I am told to first remove all i386 packages.
Asked
Active
Viewed 1.1e+01k times
107
Journeyman Geek
- 133,878
kevinarpe
- 4,048
4 Answers
159
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:
- Review
i386packages on your system:dpkg -l | grep i386 - Remove all
i386packages:apt-get purge ".*:i386"- Note: The
purgekeyword (instead ofremove) removes all configuration files associated with the packages you're uninstalling. (Thanks PCGuyIV!)
- Note: The
- Now you can remove the
i386architecture:dpkg --remove-architecture i386
15
$ sudo apt remove `dpkg --get-selections |grep :i386 |awk '{print $1}'`
$ sudo dpkg --remove-architecture i386
Serge Stroobandt
- 2,303
0
List the package list:
sudo dpkg --list | grep :i386
remove :i386 packages one by one:
sudo dpkg --purge --force-all package-name
As for an example:
sudo dpkg --purge --force-all libc6:i386
Then remove the architecture:
sudo dpkg --remove-architecture i386
run update and upgrade:
sudo apt update && sudo apt upgrade -y