Debian notes

From raju


cut csv file by field names

Use csvcut to cut a csv file by column names. The order of the columns in the output is as specified in the command.

    % cat foo.csv 
    % csvcut -c word,letter foo.csv

Use -C to exclude some columns

    % csvcut -C letter foo.csv     
    % csvcut -C letter,color foo.csv

csvcut is part of the python3-csvkit package.

tags | cut by column names, cut by fields

List files in a package

To list files in a package

% apt-file list zsh-dev

This works irrespective of whether the package is installed or not. If a package is already installed, you can use

% dpkg -L zsh-doc

but this will not work for non-installed packages

how can I help Debian


To check for packages that are installed locally but are not part of the upcoming Jessie release

  1. apt-get install how-can-i-help
  2. how-can-i-help --old
  3. Look at packages listed under Packages removed from Debian 'testing' and Packages going to be removed from Debian 'testing'


Bugs suitable for newcomers -

% how-can-i-help --old --show newcomer

status of installed applications

Objective: Find whether an application that matches a keyword and is currently installed is uptodate or upgradeable.

Solution: Use "apt-show-versions -r keyword". For example,

% apt-show-versions -r mouse
kmousetool:amd64/jessie 4:4.12.2-1 uptodate
mousetweaks:amd64/jessie 3.12.0-1 uptodate
xserver-xorg-input-mouse:amd64/jessie 1:1.9.0-1+b3 upgradeable to 1:1.9.1-1
xserver-xorg-input-vmmouse:amd64/jessie 1:13.0.0-1+b3 uptodate

recursively list package dependencies

Remove packages that match a regular expression

Taking a screenshot

Here are some ways

Take a snapshot of area selected by mouse after waiting for 2 seconds. If the output file already exists, it will be overwritten.

% sleep 2; import myimage.jpg

Take a snapshot of the entire monitor after waiting for 2 seconds. If the output file already exists, it will be overwritten.

% sleep 2; import -w root myimage.jpg

Press Print Screen button on the keyboard. For KDE users, this will bring up the ksnapshot program which is very good.

For gnome users lists many options.


random notes

 su-to-root -X -c [appname]

For example

 su-to-root -X -c synaptic

Usually, a screen with a brightness of 200 Lumen is sufficient to work comfortably. You can use a photometer to measure the brightness of the screen.

Change Nits to change the brightness of the monitor. For laptop's with Intel GPU's this can be done as follows.

// Change Nits. Number may change according to hardware
$echo 36 > /sys/class/backlight/intel_back/brightness



General information

In order to get the popularity of a single package, go to and enter the package name. For example entering fimport, I get which shows the number of installations of r-cran-fimport package over time. Note that you need to know the source package name ahead of time in order to do this.

To compare popularity of two packages, go to . In the "Packages" field, enter the list of packages separated by ',' and hit go. So for example compares the installations of r-cran-fimport and r-cran-fmultivar packages.

Q. How can I find out if my machine is participating in popcon?

A. Check if there are logfiles

root@hogwarts:/var/log# ls -al popularity-contest*
-rw-r--r-- 1 root root 151459 Nov 10 07:41 popularity-contest
-rw-r--r-- 1 root root 151007 Nov  3 08:02 popularity-contest.0
-rw-r--r-- 1 root root  32666 Oct 27 08:00 popularity-contest.1.gz
-rw-r--r-- 1 root root  32629 Oct 20 11:19 popularity-contest.2.gz
-rw-r--r-- 1 root root  32955 Oct 13 08:02 popularity-contest.3.gz
-rw-r--r-- 1 root root  32926 Oct 13 00:20 popularity-contest.4.gz
-rw-r--r-- 1 root root  32854 Oct  6 07:48 popularity-contest.5.gz
-rw-r--r-- 1 root root  32799 Sep 29 08:06 popularity-contest.6.gz
-rw-r--r-- 1 root root  45921 Nov 10 07:41 popularity-contest.gpg

Q. Which patching system is popular to make debian packages?

A. 3.0 Quilt Ref:-

packages and bugs

packages from old stable release

To search for installed packages that are part of the old stable release

First include the oldstable release in /etc/apt/sources.list and run apt-get update.

aptitude search '?narrow(?installed,?archive(oldstable), !?archive(stable) )'

You can also just do

aptitude search '?narrow(?installed,?archive(oldstable))'

in which case the results will include packages that have the same version number in both stable and oldstable. If the package is part of the current stable release may be it is worth keeping around. That is why it is better to make sure that they are not part of the current stable release.


Browse packages and files

To browse the package list

To browse the file list

To download and examine the files

% wget
% tar xJvf zsh_5.0.8-4.debian.tar.xz
% cd debian
% vim newuser.zshrc.recommended

Available security updates

To get a list of available security updates

aptitude -> Security Updates

Todo:- Have to find out how to do this via command line

Q. Which GPU am I using?
A. use "lspci | grep VGA". For example, this is what I have

rajulocal@hogwarts:~$ lspci | grep VGA
02:00.0 VGA compatible controller: NVIDIA Corporation G98 [Quadro NVS 295] (rev a1)

some printing protocols: AirPrint, Google cloud print, IPP, PCL

apt-mark showmanual | grep texlive

calibre - ebook manager, create ebooks, edit ebooks

which terminal emulator am I using? $ update-alternatives --display x-terminal-emulator

Selectively download upgrades to all the installed packages

Download upgrades to all the installed packages whose name contains perl

$ dpkg -l \*perl\* | grep ^ii | awk '{print $2}' | tr '\n' ' ' | xargs sudo apt-get install -y --download-only

Building from source

Instructions to build iceweasel from source -


External links

Packages I have to experiment with

  1. finance - beancounter, smtm
  2. fslint - clean up filesystem lint. Includes a GUI.


Articles to be read later

Useful articles