342

The cleanup (brew cleanup) command will remove outdated installed package versions. To affect a particular package/formula, you may supply a formula name like so: brew cleanup $FORMULA. To simulate cleanup, i.e. see what would be removed, you may use the -n option: brew cleanup -n.


197

Since version 1.3, pip features a new command: $ pip list --outdated requests (Current: 1.1.0 Latest: 1.2.0) See this post for more information.


117

You can set "sticky" versions like this: # Both are equal apk add packagename=1.2.3-suffix apk add 'packagename<1.2.3-suffix' That will upgrade packages only until the specified version. You can then safely use … apk upgrade to upgrade all packages, while packages with versions will remain with their version. To set a minimum version just use …...


85

@aknuds1 is right about brew cleanup so I'll just add that I have an alias in my ~/.profile that does all my brew-related cleanup, including cask update/cleanup alias brewski='brew update && brew upgrade && brew cleanup; brew doctor' I end with brew doctor to make sure all packages are correctly symlinked, e.g., awscli seems to have a ...


80

Use the --needed option to skip reinstall of existing packages when you Sync (-S). If a package in the list is already installed on the system, it will be reinstalled even if it is already up to date. This behavior can be overridden with the --needed option. Source More info


47

Another alternative: $ dpkg -S /bin/bash bash: /bin/bash On my Ubuntu at least, both seem to be in the dpkg package, so no real advantage to any specific one...


37

Just for the records, you can clean the outdated versions of the packages that you are about to upgrade using the --cleanup flag: brew upgrade --cleanup <package_name>


22

The answer I believe will be, "it depends". :-) The majority of packages on Chocolatey are simply wrappers to the underlying MSI's and EXE's that you would ultimately be running manually yourself, it just automates the process. In theory, if you run Chocolatey for a package that is already installed, when the MSI or EXE is run, it should detect that it ...


22

I would go with this: apt-get download PACKAGE && apt-cache depends -i PACKAGE | awk '/Depends:/ {print $2}' | xargs apt-get download Then you can install it with dpkg -i *.deb in the directory you downloaded these.


21

1. What is servicing and what does the servicing stack do? Servicing is the name of configuring Windows updates or Windows features (installing, removing updates/features). This can be done when Windows is running (Online) or against a not running Windows partition/or mounted WIM (offline): What is servicing? Servicing is the act of installing a role, ...


20

Currently, there is no way to install arbitrary older versions of a package from official repositories in Alpine Linux. The best thing you can achieve is using repositories of the earlier releases: # cat /etc/alpine-release 3.3.3 # echo 'http://dl-cdn.alpinelinux.org/alpine/v3.2/main' >> /etc/apk/repositories # apk update fetch http://dl-cdn....


19

For Ubuntu v17.04 ("Zesty Zapus") and Debian v9 ("Stretch"), (2017 or newer), or distros based upon those versions, please read Bryan Larsen's answer first, which should be sufficient. For versions from before 2017, read on... Use dpkg to force the install; parallel gets along nicely with moreutils -- it renames moreutils' parallel util to parallel....


18

Installation generated files will not be found by dpkg -S, as mentioned at: https://askubuntu.com/a/667227/52975 For example, /bin/nc appears when you install the package netcat-openbsd. But upon: dpkg -S /bin/nc we get dpkg-query: no path found matching pattern /bin/nc. This happens because /bin/nc is generated by the update-alternatives call in the ...


15

In case you did add some other architecture that you forgot, like i386 to an amd64 system, you can check it by: dpkg --print-foreign-architectures Source: https://wiki.debian.org/Multiarch/HOWTO


15

With Yum, you would use the package-cleanup command from yum-utils. But, with DNF, it's built in as the dnf autoremove command. From the docs: dnf [options] autoremove Removes all “leaf” packages from the system that were originally installed as dependencies of user-installed packages but which are no longer required by any such package. Note that ...


13

Alternative: zypper search -i -r <repo alias|#|URI>


12

apt-cache policy gdb Sample output: gdb: Installed: 7.7.1-0ubuntu5~14.04.2 Candidate: 7.7.1-0ubuntu5~14.04.2 Version table: *** 7.7.1-0ubuntu5~14.04.2 0 500 http://fr.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 100 /var/lib/dpkg/status 7.7-0ubuntu3 0 500 http://fr.archive.ubuntu.com/ubuntu/ trusty/main ...


12

You can find the description of remove, autoremove, purge, clean and autoclean, as well as the syntax in the manpages for apt-get: man apt-get. If you are still unsure after reading it though (I was) the best way to clarify it is to try it out. Below is an example of a full dependency tree for vim: You can get it with: apt-rdepends -d vim > vim.dot ...


12

What you probably are looking for are called configuration management tools. There are several to choose from but and it's very subjective which one is best in any situation. I personally found Puppet to be quite easy to get started with, but other popular choices are Salt and Ansible.


12

You probably should look at NixOS, which uses the Nix package manager. NixOS is a GNU/Linux distribution that aims to improve the state of the art in system configuration management. In existing distributions, actions such as upgrades are dangerous: upgrading a package can cause other packages to break, upgrading an entire system is much less reliable than ...


11

After you install a .deb package (regardless of source – apt or local), it's managed by dpkg: dpkg -L packagename


10

Short answer: It is possible that you actually do not want to do this. Why is that? There has been a lot of discussion on this particular functionality. One such is in this (duplicate)bug report and the one it is linked to. Discussion at the bug report also explains that "--ignore-missing" only applies if the there is an issue downloading a package that ...


10

This is likely overkill for your question, but the easiest way to be able to revert system-level / massive changes is snapshotting: https://en.wikipedia.org/wiki/Snapshot_%28computer_storage%29 You have not mentioned the specifics of your rig, but seeing as you are familiar with git, it wouldn't be too much of a stretch to imagine you might be interested ...


10

You were close. First, you have to set the execution policy to allow scripts, otherwise it'll silently fail while reporting success (bug): Set-ExecutionPolicy RemoteSigned Both the package provider (Chocolatey plugin) and package source (URL to specific Chocolatey repo) need to be installed/registered with PackageManagement. Get-PackageProvider with the -...


9

I wonder why no one mentioned aptitude. I use it all the time. Aptitude is: Shipped by default with many Debian-based distributions. Can be installed to other (such as Ubuntu) via sudo apt install aptitude. Does not require administrative privileges (at least for the command below). Does have a nice ncurses GUI (but most of the time used without it). ...


9

This feature is provided by the command-not-found( Its function is to suggest alternatives and corrections in case of mistyping etc. ) package. Ubuntu installs it by default. how does it work? The way it works is through the command_not_found_handle() function in bash. bash provides a hook which is basically a function that is invoked when a command is ...


8

The main pypi index may be down or having problems. Try executing pip install --use-mirrors to automatically use backup mirrors. See pip install --help for details.


8

Have a look into /root/.synaptic/synaptic.conf. Look for the DefaultDistro line and change its value, e.g. replace stable with wheezy.


8

I get the same error with apt, so it's unrelated to synaptic. However, this config exists: # grep -ri stable /etc /etc/apt.conf.d/99myDefaultRelease:APT::Default-Release "stable"; So changing that file to "jessie" would fix it in my case (as I'm on jessie.)


Only top voted, non community-wiki answers of a minimum length are eligible