Skip to content

Instantly share code, notes, and snippets.

@xaratustrah
Last active May 5, 2020 12:31
Show Gist options
  • Save xaratustrah/f122bb20647a896fe3fb0c3ebd495965 to your computer and use it in GitHub Desktop.
Save xaratustrah/f122bb20647a896fe3fb0c3ebd495965 to your computer and use it in GitHub Desktop.
package_management_commands.md

Common commands used in package management systems

Pacman

Archlinux Debian / Ubuntu
pacman -Sy apt-get update
pacman -Syu apt update + apt distpgrade
pacman -Ss like apt-cache search
pacman -S PAKETNAME apt-get install PAKETNAME
pacman -Ql PAKETNAME dpkg -L PAKETNAME, list files of a packet
pacman -Syy force update of the repository
pacman -Syyu like above, the "u" at the end updates packages as well
pacman -U PATHTOPACK install local packet
pacman -Sc clean local package data
pacman -Rns PAKETNAME Uninstall a package

PIP

full upgrade:

pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 sudo -H pip install -U

Please pay attention that a full upgrade on OSX may result in numpy not to work, if it had previously been installed via macports. If this happens, then reinstall numpy in macports.

Generally interesting pip packages for both OSX and Win

Other packages are installed using standard PyPi repository:

pip install statspy matplotlib prettyplotlib beautifulsoup4 Flask pyzmq jdcal jdate jupyter fortran-magic fortranformat pyFFTW

APT and apt-get

find fastest mirror:

sudo apt-get install netselect-apt install build-essential module-assistant

vor VirtualBox you need the following module:

m-a prepare

Full upgrade:

sudo apt-get update && time sudo apt-get dist-upgrade

or:

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoclean && sudo apt-get autoremove

List all installed packagaes:

	dpkg -l
	apt list --installed

MacPorts

some commands:

port echo leaves
sudo port uninstall leaves

sudo port uninstall inactive
sudo port uninstall --follow-dependencies portname
sudo port upgrade outdated
sudo port selfupdate
sudo port -d selfupdate

some other useful commands:

sudo port -qv installed > ~/Downloads/portslist.text
sudo port -f uninstall installed
sudo port clean all
sudo less /opt/local/etc/macports/macports.conf
sudo port selfupdate
sudo port upgrade outdated
sudo port upgrade installed
sudo port install libgcc +universal
port file PORTNAME # shows you the location of the Portfile
port contents PORTNAME # shows all installed files.

Some of the default packages I always install:

sudo port install geda-gaf pcb gerbv gtkwave xgsch2pcb qucs mg ncdu tree mc emacs-mac-app py34-h5py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment