https://www.debian.org/doc/manuals/debian-reference/ch02.en.html
https://raymii.org/s/tutorials/Debian-apt-get-dpkg-packages-cleanup-commands.html
https://askubuntu.com/questions/327951/removing-earlier-versions-of-installed-package
https://blog.al4.co.nz/2016/09/building-packaging-python-command-line-tool-debian/
Distributions
Linux works differently. The Linux operating system isn’t produced by a single organization. Different organizations and people work on different parts. There’s the Linux kernel (the core of the operating s ystem), the GNU shell utilities (the terminal interface and many of the commands you use), the X server (which produces a graphical desktop), the desktop environment (which runs on the X server to provide a g raphical desktop), and more. Linux distributions do the hard work for you, taking all the code from the open-source projects and compiling it for you, combining it into a single operating system you can boot up and install. When you want to install new software or update to new versions of software with important security updates, your Linux distribution provides them in precompiled, packaged form.
Path
sudo apt-get update
/etc/apt/sources.list.d
DebianRepository
refer
- sources.list
deb uri distribution [component1] [component2] [...]
- dists: distribution
- pool: archive root
dh_make
dh_make -f source.tar.gz
Debian Build
RUN mk-build-deps -t "apt-get -y --no-install-recommends" -i "debian/control"
RUN dpkg-buildpackage
RUN for deb in ../*.deb; do dpkg-deb --contents "$deb"; done \
&& lintian --profile xxxx ../*.changes
Debian testing
Lintian dissects Debian packages and reports bugs and policy violations. It contains automated checks for many aspects of Debian policy as well as some checks for common errors
lintian path/to/pkg_version_arch.changes
list content
dpkg-deb -c <package_name.deb>
dpkg -i {.deb package} Install the package dpkg -i zip_2.31-3_i386.deb
dpkg -i {.deb package} Upgrade package if it is installed else install a fresh copy of package dpkg -i zip_2.31-3_i386.deb
dpkg -R {Directory-name} Install all packages recursively from directory dpkg -R /tmp/downloads
dpkg -r {package} Remove/Delete an installed package except configuration files dpkg -r zip
dpkg -P {package} Remove/Delete everything including configuration files dpkg -P apache-perl
dpkg -l List all installed packages, along with package version and short description dpkg -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 description dpkg -l apache-perl
dpkg -L {package} Find out files are provided by the installed package i.e. list where files were installed dpkg -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 installed dpkg -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 belong dpkg -S /bin/netstat
dpkg -S /sbin/ippool
dpkg -p {package} Display details about package package group, version, maintainer, Architecture, display depends packages, description etc dpkg -p lsof
dpkg -s {package} | grep Status Find out if Debian package is installed or not (status) dpkg -s lsof | grep Status
commands
refer