How to: Use pacman commands with apt-get

As a Arch Linux guy, i’m a keen pacman user. But when i have to work with my Debian box and its package management software apt-get, i struggle using it.

As a result, i created simple shell function to convert pacman style commands to their apt-get equilevants (with help of arch wikis rosetta stone).

Just place this in your ~/.bashrc:

function pacman () {
	case $1 in
			sudo apt-get update && sudo apt-get upgrade
			sudo apt-get update && sudo apt-get install "${@:2}"
			apt-cache search "${@:2}"
			apt-cache show "${@:2}"
			dpkg --get-selections | grep "${@:2}"
			dpkg -s "${@:2}"
			sudo apt-get remove "${@:2}"
			sudo apt-get autoremove "${@:2}"
			echo "Please use proper paremeter (eg. -Ss)"

Unfortunately, i haven’t figured out how to use make sudo work with this functions, so i implemented sudo as a part of the commands. Let me know if you have any idea.

Leave a Comment

Filed under Sekalaiset