2022 Developer Survey is open! Take survey.
349 votes
Accepted

How can I remove outdated installed versions of Homebrew packages?

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 ...
user avatar
  • 9,208
156 votes
Accepted

How to install a specific package version in Alpine?

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. ...
user avatar
  • 1,730
88 votes

How can I remove outdated installed versions of Homebrew packages?

@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 && ...
user avatar
  • 3,579
38 votes

How can I remove outdated installed versions of Homebrew packages?

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>
user avatar
28 votes
Accepted

Is there a way to convert a non-Chocolatey installed program into a Chocolatey installed one?

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 ...
user avatar
28 votes
Accepted

How to download .deb package and all dependencies?

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

How to install a specific package version in Alpine?

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: # ...
user avatar
23 votes
Accepted

What is the servicing stack and how does it work?

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 ...
user avatar
19 votes

How do I find out which package owns a file?

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: ...
19 votes

How can I install GNU Parallel alongside Moreutils on Ubuntu/Debian?

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 ...
user avatar
  • 617
18 votes

How to remove all packages with DNF on which no other package depends on

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” ...
user avatar
  • 2,647
16 votes

Which Debian package architecture am I using?

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
user avatar
  • 179
13 votes

How to find out which versions of a package can I install on APT

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....
user avatar
13 votes

Zypper: How do I display all packages from a certain repository?

Alternative: zypper search -i -r <repo alias|#|URI>
user avatar
  • 423
12 votes

How can I achieve "Git"-like update management for Linux?

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 ...
user avatar
  • 33.5k
12 votes

How can I achieve "Git"-like update management for Linux?

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 ...
user avatar
11 votes

Find outdated/updatable pip packages

Thing is, I never upgrade all packages. I upgrade only what I need, because projects may break. Because there was no easy way to upgrade package by package and update the requirements.txt file, I ...
user avatar
11 votes
Accepted

Continue on error when apt-get encounters an install unable to locate package issue

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 ...
user avatar
10 votes

How to find which package certain command belongs to on CentOS?

For CentOS, how about yum provides? Use which free to find out where it is For me it's at /usr/bin/free So then you can run yum provides /usr/bin/free and it will tell you which package has ...
user avatar
  • 101
10 votes
Accepted

Arch Linux: 'whatprovides' equivalent option for pacman

pacman -F file_name for Pacman v5.2.1 - libalpm v12.0.1
user avatar
  • 307
10 votes

How can I fix the error "The value 'stable' is invalid for APT::Default-Release"?

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 ...
user avatar
  • 251
10 votes

How can I achieve "Git"-like update management for Linux?

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 ...
user avatar
  • 157
10 votes
Accepted

How do I use Windows 10 built-in package manager?

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 (...
user avatar
  • 420
10 votes

How to install a specific package version in Alpine?

The syntax for pinning alpine packages with apk is apk add packageName=x.y.z. To set a minimum version, use apk add packageName>x.y.z Example: FROM alpine:3.3 RUN apk update && apk upgrade ...
user avatar
10 votes
Accepted

MSYS2 and "At least one valid and enabled repository required for this action to succeed."

The maintenancetool.exe is IMO undeniably a flat out a broken monstrosity that the msys2 DEV team (apparently 4 people in the entire WORLD) listed here on the MSYS2 Github repo: should have yanked ...
user avatar
9 votes

How can I undo or rollback an "apt-get upgrade" command on Ubuntu?

I had to do this today on my Debian system. First, I identified the time range when the offending upgrade happened, and retrieved the log entries giving the old and new version numbers of the upgraded ...
user avatar
  • 402
9 votes

How to tell from what Ubuntu or Debian repository a package comes?

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 ...
user avatar
8 votes

Pacman doesn't download anything - Always 404

Use mirror reflector sudo pacman -S reflector Install it and type: sudo reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist
user avatar
8 votes

How can I install GNU Parallel alongside Moreutils on Ubuntu/Debian?

This conflict is solved in Ubuntu 17.04 and Debian Stretch. If you install parallel & moreutils you get the GNU parallel as /usr/bin/parallel and moreutil's parallel as /usr/bin/parallel.moreutils....
user avatar

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