Files
oam/knowledge base/linux/dkpg.md
2022-04-17 23:55:08 +02:00

28 lines
753 B
Markdown

# Dpkg
## TL;DR
```shell
# add an extra architecture
dpkg --add-architecture i386
# list extra architectures
dpkg --print-foreign-architectures
# list available extra architectures
dpkg-architecture --list-known
#list all installed packages of the i386 architecture
dpkg --get-selections | grep i386 | awk '{print $1}'
# remove the i386 architecture
apt-get purge $(dpkg --get-selections | grep --color=never i386 | awk '{print $1}')
dpkg --remove-architecture i386
```
## Further readings
- [How to check if dpkg-architecture --list has all the architectures?]
[how to check if dpkg-architecture --list has all the architectures?]: https://askubuntu.com/questions/852115/how-to-check-if-dpkg-architecture-list-has-all-the-architectures#852120