Refactor dpkg aliases
This commit is contained in:
parent
9bf1789cc2
commit
ec9c8fae49
|
@ -8,24 +8,44 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias as="aptitude -F \"* %p -> %d \n(%v/%V)\" --no-gui --disable-columns search" # Searches for a package.
|
|
||||||
alias ad="sudo apt-get update" # Updates packages lists.
|
|
||||||
alias au="sudo apt-get update && sudo apt-get dselect-upgrade" # Upgrades packages.
|
|
||||||
alias ai="sudo apt-get install" # Installs package.
|
|
||||||
alias ar="sudo apt-get remove --purge && sudo apt-get autoremove --purge" # Removes package.
|
|
||||||
alias ap="apt-cache policy" # Prints pinning levels.
|
|
||||||
alias av="apt-cache show" # Shows package info.
|
|
||||||
alias acs="apt-cache search" # Searches for a package.
|
|
||||||
alias ac="sudo apt-get clean && sudo apt-get autoclean" # Cleans cache.
|
|
||||||
alias afs='apt-file search --regexp' # Finds a file's packake.
|
|
||||||
|
|
||||||
# Installs all .deb files in the current directory.
|
# Cleans the cache.
|
||||||
# WARNING: You will need to put the glob in single quotes if you use GLOB_SUBST.
|
alias debc='sudo apt-get clean && sudo apt-get autoclean'
|
||||||
alias debi='su -c "dpkg -i ./*.deb"'
|
|
||||||
|
# Displays a file's packake.
|
||||||
|
alias debf='apt-file search --regexp'
|
||||||
|
|
||||||
|
# Installs packages from repositories.
|
||||||
|
alias debi='sudo apt-get install'
|
||||||
|
|
||||||
|
# Installs packages from files.
|
||||||
|
alias debI='sudo dpkg -i'
|
||||||
|
|
||||||
|
# Displays package information.
|
||||||
|
alias debq='apt-cache show'
|
||||||
|
|
||||||
|
# Updates the packages lists.
|
||||||
|
alias debu='sudo apt-get update'
|
||||||
|
|
||||||
|
# Upgrades outdated packages.
|
||||||
|
alias debU='sudo apt-get update && sudo apt-get dist-upgrade'
|
||||||
|
|
||||||
|
# Removes packages.
|
||||||
|
alias debx='sudo apt-get remove'
|
||||||
|
|
||||||
|
# Removes packages, their configuration, and unneeded dependencies.
|
||||||
|
alias debX='sudo apt-get remove --purge && sudo apt-get autoremove --purge'
|
||||||
|
|
||||||
|
# Searches for packages.
|
||||||
|
if (( $+commands[aptitude] )); then
|
||||||
|
alias debs='aptitude -F "* %p -> %d \n(%v/%V)" --no-gui --disable-columns search'
|
||||||
|
else
|
||||||
|
alias debs='apt-cache search'
|
||||||
|
fi
|
||||||
|
|
||||||
# Creates a basic .deb package.
|
# Creates a basic .deb package.
|
||||||
alias debc='time dpkg-buildpackage -rfakeroot -us -uc'
|
alias deb-build='time dpkg-buildpackage -rfakeroot -us -uc'
|
||||||
|
|
||||||
# Removes ALL kernel images and headers EXCEPT the one in use.
|
# Removes all kernel images and headers, except for the ones in use.
|
||||||
alias kclean='su -c '\''aptitude remove -P ?and(~i~nlinux-(ima|hea) ?not(~n`uname -r`))'\'' root'
|
alias deb-kclean='sudo aptitude remove -P "?and(~i~nlinux-(ima|hea) ?not(~n`uname -r`))"'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue