December 21, 2013


We aim to collect practical, well-explained bash one-liners, and promote best practices in shell scripting.

Purging i386 Packages From AMD64

After trying out the free demo of X-Plane and removing it from my 64bit installation, I wanted to purge all the i386 packages I no longer needed ( 224 packages ).

After some Google search I found this one-liner :

sudo apt-get purge  `dpkg --get-selections | grep i386 | awk '{print $1}'`

To simulate the above command you can add the -s option and see exactly what gets removed before actually running it....

sudo apt-get -s purge  `dpkg --get-selections | grep i386 | awk '{print $1}'`

After this operation, 492 MB disk space will be freed.
Do you want to continue [Y/n]? y

Removing libao4:i386 ...
Purging configuration files for libao4:i386 ...
Removing lib32asound2 ...
Purging configuration files for lib32asound2 ...
Removing nvidia-304 ...


I only had to reinstall nvidia-304 afterwards...

Links :

December 13, 2013

Manage Trash With Trashindicator

Download trashindicator_1.00-1_all.deb from

Open terminal and navigate to Downloads :
cd Downloads
Installation :
sudo dpkg -i trashindicator_1.00-1_all.deb

Trashindicator will be added to the Startup Applications in System Settings.

Restart wingpanel :
killall wingpanel or log out and log in again.

December 9, 2013

Show Username On Wingpanel

In terminal :
gsettings set com.canonical.indicator.session show-real-name-on-panel true
then :  
killall wingpanel


Remove username :
gsettings set com.canonical.indicator.session show-real-name-on-panel false
then : 
killall wingpanel

December 8, 2013

Hiding Applications Slingshot-Launcher

Open Terminal and navigate to /usr/share/applications :
cd /usr/share/applications

E.g. I wanted to remove the icon Archive Manager from slingshot :

sudo nano file-roller.desktop

Add a line NoDisplay=true

Hit Ctrl+O , Enter and then Ctrl+X

December 7, 2013

Use Pepperflash In Chromium

Go to the Google Chrome Webpage and download the web browser for your processor architecture.
Unpack the deb package:

Navigate to /opt/google/chrome/PepperFlash/ and extract :

Then :
cd Downloads
sudo mv /usr/lib/chromium-browser/plugins

Edit the file /etc/chromium-browser/default :
sudo nano /etc/chromium-browser/default and make the following change :

# Options to pass to chromium-browser
CHROMIUM_FLAGS=" --ppapi-flash-path=/usr/lib/chromium-browser/plugins/"

Restart chromium....

Check the setting at chrome://plugins in the address bar ( press +Details ) :