viernes, 3 de febrero de 2023

Commands for dpkg include:

1. dpkg 

2. dpkg-query 

3. dpkg-architecture 

4. dpkg-buildflags 

5. dpkg-deb 

6. dpkg-dev 

7. dpkg-divert 

8. dpkg-genchanges 

9. dpkg-gencontrol 

10. dpkg-gensymbols 

11. dpkg-maintscript-helper 

12. dpkg-mergechangelogs 

13. dpkg-name 

14. dpkg-parsechangelog 

15. dpkg-preconfigure 

16. dpkg-scanpackages 

17. dpkg-scansources 

18. dpkg-shlibdeps 

19. dpkg-source 

20. dpkg-split 

21. dpkg-statoverride 

22. dpkg-trigger 

23. dpkg-vendor

------------------------------------------------------------------------------------------------------------------------

1) dpkg

SyntaxDescriptionExample
dpkg -i {.deb package}Install the packagedpkg -i zip_2.31-3_i386.deb
dpkg -i {.deb package}Upgrade package if it is installed else install a fresh copy of packagedpkg -i zip_2.31-3_i386.deb
dpkg -R {Directory-name}Install all packages recursively from directorydpkg -R /tmp/downloads
dpkg -r {package}Remove/Delete an installed package except configuration filesdpkg -r zip
dpkg -P {package}Remove/Delete everything including configuration filesdpkg -P apache-perl
dpkg -lList all installed packages, along with package version and short descriptiondpkg -l
dokg -l | less
dpkg -l '*apache*'
dpkg -l | grep -i 'sudo'
dpkg -l {package}List individual installed packages, along with package version and short descriptiondpkg -l apache-perl
dpkg -L {package}Find out files are provided by the installed package i.e. list where files were installeddpkg -L apache-perl
dpkg -L perl
dpkg -c {.Deb package}List files provided (or owned) by the package i.e. List all files inside debian .deb package file, very useful to find where files would be installeddpkg -c dc_1.06-19_i386.deb
dpkg -S {/path/to/file}Find what package owns the file i.e. find out what package does file belongdpkg -S /bin/netstat
dpkg -S /sbin/ippool
dpkg -p {package}Display details about package package group, version, maintainer, Architecture, display depends packages, description etcdpkg -p lsof
dpkg -s {package} | grep StatusFind out if Debian package is installed or not (status)dpkg -s lsof | grep Status



https://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php

------------------------------------------------------------------------------------------------------------

2) dpkg-query

1. List all installed packages:

# dpkg-query --list

2. List installed packages matching a pattern:

# dpkg-query --list 'libc6*'

3. List all files installed by a package:

# dpkg-query --listfiles libc6

4. Show information about a package:

# dpkg-query --status libc6

5. Search for packages that own files matching a pattern:

# dpkg-query --search /etc/ld.so.conf.d    

No hay comentarios:

Publicar un comentario