Skip to content

Instantly share code, notes, and snippets.

@rpavlik
Created February 24, 2018 21:59
Show Gist options
  • Save rpavlik/0d1a5b2d3cc4a9a436e884d10c692852 to your computer and use it in GitHub Desktop.
Save rpavlik/0d1a5b2d3cc4a9a436e884d10c692852 to your computer and use it in GitHub Desktop.
Find some installed packages and get just their names, suffixed by a forced version.
#!/bin/sh
# for instance, for fixing/removing a botched locally-build kernel.
dpkg -l|grep "bpo9+1.1" | sed -r 's/ii\s+(\S+).*/\1=4.14.13-1~bpo9+1/' | xargs echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment