63

I added foreign architecture i386 to my Debian amd64 installtion. How do I remove it? When I try this command: dpkg --remove-architecture i386, I am told to first remove all i386 packages.

84

I am answering my own question after gathering important information from other blog posts.

  1. Show what foreign architectures are installed: dpkg --print-foreign-architectures
    • Might show: i386
  2. Remove all i386 packages: apt-get purge ".*:i386"
    • Note: The purge keyword (instead of remove) removes all configuration files associated with the packages you're uninstalling. (Thanks PCGuyIV!)
  3. Now you can remove the i386 architecture: dpkg --remove-architecture i386
  • 2
    Cheers. This was perfect. – Glenn Oct 1 '14 at 22:44
  • @kevinarpe You might accept this answer as the best answer. – 71GA Sep 12 '18 at 7:39
  • 1
    You might want to find out which i386 packages you might have installed first: dpkg -l | grep i386 – Panki Oct 1 '20 at 13:12
  • It was wonderful and epic. This made my day. Thanks. – Tower Oct 8 '20 at 23:31
29

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.

  • 2
    Can you expand your answer to explain the difference and ramifications? – fixer1234 Jul 12 '15 at 23:07
4
$ sudo apt remove `dpkg --get-selections |grep i386 |awk '{print $1}'`
$ sudo dpkg --remove-architecture i386

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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