Added dpkg notes to the knowledge base

This commit is contained in:
Michele Cereda
2022-04-17 23:55:08 +02:00
parent 3d6637a9db
commit 43b056b04d
2 changed files with 29 additions and 0 deletions

View File

@@ -3,8 +3,10 @@
## Further readings
- The [APT] package manager
- [Dpkg]
- [Advice for new users on not breaking their Debian system]
[apt]: apt.md
[dpkg]: dpkg.md
[advice for new users on not breaking their debian system]: https://wiki.debian.org/DontBreakDebian

View File

@@ -0,0 +1,27 @@
# 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