Commands matching dpkg (119)

  • Use dpkg-query to query packages.


    0
    dpkg-query -W -f '${binary:Package} ${Status}\n' '*' |sed -n 's/ deinstall ok config-files//p'|xargs dpkg --purge
    ceving · 2016-09-06 11:43:04 15

  • 0
    sudo apt-get purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
    bDrwx · 2016-09-23 15:33:18 25
  • select generic 105 intl. pc > german (turkisch)


    0
    dpkg-reconfigure keyboard-configuration
    aysadk · 2017-07-14 15:04:02 100
  • Same as 7272 but that one was too dangerous so i added -P to prompt users to continue or cancel Note the double space: "...^ii␣␣linux-image-2..." Like 5813, but fixes two bugs: [1]This leaves the meta-packages 'linux-headers-generic' and 'linux-image-generic' alone so that automatic upgrades work correctly in the future. [2]Kernels newer than the currently running one are left alone (this can happen if you didn't reboot after installing a new kernel).


    -1
    sudo aptitude remove -P $(dpkg -l|awk '/^ii linux-image-2/{print $2}'|sed 's/linux-image-//'|awk -v v=`uname -r` 'v>$0'|sed 's/-generic//'|awk '{printf("linux-headers-%s\nlinux-headers-%s-generic\nlinux-image-%s-generic\n",$0,$0,$0)}')
    Bonster · 2011-04-25 05:19:57 3

  • -1
    dpkg -l | sed '/^rc/!d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/' | xargs -r sudo apt-get -y purge
    plasticdoc · 2011-06-05 09:19:27 3

  • -1
    dpkg -l |grep i386 | awk '{ print "apt-get -y remove --purge "$2 }' | sh
    rubenmoran · 2013-03-23 19:19:24 5

  • -1
    sudo dpkg -i *.deb
    newnumber · 2017-06-20 11:45:35 16

  • -1
    sudo fuser -vki /var/lib/dpkg/lock; sudo dpkg --configure -a
    newnumber · 2017-06-20 12:00:02 22

  • -2
    dpkg -L Your_Package
    eastwind · 2009-12-06 14:49:04 3

  • -2
    dpkg --get-selections | awk '$2=="install" {print $1}' | sort
    depesz · 2011-03-15 08:39:26 4
  • Uses dpkg -S or apt-file to find the file you want and shows results in various ways. Available at https://github.com/Pipeliner/configs/blob/master/bin/pacof pacof -xp 'bin/[^/]*mixer' alsamixergui alsa-tools-gui alsa-utils ... Show Sample Output


    -2
    pacof -e rlogin
    pipeliner · 2011-11-04 13:17:04 4
  • This will, for an application that has already been removed but had its configuration left behind, purge that configuration from the system. To test it out first, you can remove the last -y, and it will show you what it will purge without actually doing it. I mean it never hurts to check first, "just in case." ;)


    -3
    dpkg-query -l| grep -v "ii " | grep "rc " | awk '{print $2" "}' | tr -d "\n" | xargs aptitude purge -y
    thepicard · 2009-04-28 19:25:53 11
  • Use the hold space to preserve lines until data is needed.


    -3
    sed -ne '/^Package: \(.*\)/{s//\1/;h;};/^Installed-Size: \(.*\)/{s//\1/;G;s/\n/ /;p;}' /var/lib/dpkg/status | sort -rn
    arcege · 2009-10-19 19:01:17 24

  • -3
    sudo dpkg -P $(dpkg -l | grep -i adobeair)
    xmonkey · 2010-11-02 14:09:16 4

  • -4
    dpkg-reconfigure -phigh xserver-xorg
    raiden · 2009-02-26 21:22:57 7
  • Useful for removes a package and its depends, for example to remove the gnome desktop environment, also configuration files will be removed, you should be carefully and sure that you want to do this. Show Sample Output


    -4
    sudo apt-get remove --purge `dpkg -l | awk '{print $2}' | grep gnome` && apt-get autoremove
    kelevra · 2009-04-28 10:34:42 14
  • convert to debian package file (deb) a redhat package file (rpm) , then you can install it by using dpkg , require alien package ( sudo apt-get install alien first ) Show Sample Output


    -5
    sudo alien --to-deb Your_PackAge.rpm
    eastwind · 2009-09-27 13:49:07 5
  • IMVHO if you are using cpan to install perl modules you are doing it wrong. Show Sample Output


    -5
    dpkg-query -W | grep perl
    unixmonkey10924 · 2010-07-20 16:14:04 4
  • Install a deb package you have downloaded (synaptic has to be closed). (dpkg-dev needs to be installed) After that you may have to run following: sudo apt-get install -f (that should fix any dependency problems) I am using ubuntu linux


    -7
    sudo dpkg -i packagename.deb
    bkn390 · 2009-09-25 09:54:04 13
  • ‹ First  < 3 4 5

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Look for English words in /dev/urandom
* to get the English dictionary: wget http://www.mavi1.org/web_security/wordlists/webster-dictionary.txt

how to export a table in .csv file
Exports the result of query in a csv file

edit hex mode in vim
return to normal mode from hex mode :%!xxd -r

diff the same file in two directories.
This is useful when you're diffing two files of the same name in radically different directory trees. For example: Set $ path1='/some/long/convoluted/path/to/all/of/your/source/from/a/long/dead/machine' then $ path2='/local/version/of/same/file' then run the command. Much easier on the eyes when you're looking back across your command history, especially if you're doing the same diff over and over again.

copy from host1 to host2, through your host
Good if only you have access to host1 and host2, but they have no access to your host (so ncat won't work) and they have no direct access to each other.

List detailed information about a ZIP archive
list zipfile info in long Unix ``ls -l'' format.

draw line separator (using knoppix5 idea)
This is a slightly modified version of the knoppix5 user oneliner (https://www.commandlinefu.com/commands/view/24571/draw-line-separator).

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Extract IPv4 addressess from file


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: