How to remove all i386 architecture packages from 64-bit linux mint (and ubuntu too)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
ilAli
Level 3
Level 3
Posts: 104
Joined: Thu Mar 31, 2011 3:00 am
Location: Tehran
Contact:

How to remove all i386 architecture packages from 64-bit linux mint (and ubuntu too)

Post by ilAli »

If you added (or already there are) foreign architecture i386 (32-bit) to your 64-bit installation. Here is how to remove them all:

1- Show what foreign architectures are installed: dpkg --print-foreign-architectures
  • It might show: i386
  • You might want to find out which i386 packages you might have installed: dpkg -l | grep ':i386'
2- Remove all i386 packages: apt-get purge ".*:i386"
  • The purge keyword (instead of remove) removes all configuration files associated with the packages you're uninstalling.
3- Now you can remove the i386 architecture: dpkg --remove-architecture i386

Warning: some apps and software may need i386 packages so removing them may cause problems in your system.
Last edited by ilAli on Mon Oct 18, 2021 4:14 am, edited 2 times in total.
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: How to remove all i386 architecture packages from 64-bit linux mint (and ubuntu too)

Post by xenopeek »

Such packages are normally installed because some program you installed requires them. For example if you install wine-installer, to be able to run Windows software on Linux Mint, it requires 32-bit versions of common libraries as most Windows software is 32-bit.

Uninstalling 32-bit packages will also make the package remove remove the program that requires them. Probably an unintended consequence. Can you please add a warning at point 2, to carefully read through what apt-get says it will do before agreeing to it and making sure not will be removed you want to keep.

And considering that, could you detail under which circumstances removing 32-bit packages would be useful?
Image
User avatar
ilAli
Level 3
Level 3
Posts: 104
Joined: Thu Mar 31, 2011 3:00 am
Location: Tehran
Contact:

Re: How to remove all i386 architecture packages from 64-bit linux mint (and ubuntu too)

Post by ilAli »

xenopeek wrote: Mon Oct 18, 2021 3:33 am Such packages are normally installed because some program you installed requires them. For example if you install wine-installer, to be able to run Windows software on Linux Mint, it requires 32-bit versions of common libraries as most Windows software is 32-bit.
Uninstalling 32-bit packages will also make the package remove remove the program that requires them. Probably an unintended consequence. Can you please add a warning at point 2, to carefully read through what apt-get says it will do before agreeing to it and making sure not will be removed you want to keep.
And considering that, could you detail under which circumstances removing 32-bit packages would be useful?
Hi xenopeek and thank you for your reply.
first of all, i was looking for some ways to make my linux mint more lean and nimble. so i found this information and decided to share it with linux mint users.
sure, there is a reason behind existing every package and usually every linux user even amateur ones should know it. (if they do not know this, let them remove some necessary packages to learn it! :))
and, now a days we cannot say "most Windows software is 32-bit", not at all.
anyway, your suggestion is welcomed and i will add disclaimer to the post.
gittiest personITW
Level 12
Level 12
Posts: 4285
Joined: Tue May 28, 2019 4:27 pm

Re: How to remove all i386 architecture packages from 64-bit linux mint (and ubuntu too)

Post by gittiest personITW »

Probably as a 'fun project for a rainy day' if there is absolutely nothing left to watch or read and you have a Timeshift backup and a cloned image and backups etc.
If you think about it though - any files that aren't being used (but might be needed for as yet uninstalled software) are only taking up disk space, not resources as such. If they are being used, then they can be considered to be important.

I definitely wouldn't think it's a good idea that anyone do that on their daily workhorse though.
Post Reply

Return to “Tutorials”