Browse Source

Refactor dpkg aliases

master
Sorin Ionescu 13 years ago
parent
commit
ec9c8fae49
  1. 54
      modules/dpkg/init.zsh

54
modules/dpkg/init.zsh

@ -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. # Cleans the cache.
alias au="sudo apt-get update && sudo apt-get dselect-upgrade" # Upgrades packages. alias debc='sudo apt-get clean && sudo apt-get autoclean'
alias ai="sudo apt-get install" # Installs package.
alias ar="sudo apt-get remove --purge && sudo apt-get autoremove --purge" # Removes package. # Displays a file's packake.
alias ap="apt-cache policy" # Prints pinning levels. alias debf='apt-file search --regexp'
alias av="apt-cache show" # Shows package info.
alias acs="apt-cache search" # Searches for a package. # Installs packages from repositories.
alias ac="sudo apt-get clean && sudo apt-get autoclean" # Cleans cache. alias debi='sudo apt-get install'
alias afs='apt-file search --regexp' # Finds a file's packake.
# Installs packages from files.
# Installs all .deb files in the current directory. alias debI='sudo dpkg -i'
# WARNING: You will need to put the glob in single quotes if you use GLOB_SUBST.
alias debi='su -c "dpkg -i ./*.deb"' # 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…
Cancel
Save