-bash: cannot create temp file for here-document: No space left on device

I'm getting following error while doing tab, tab inside of shell:

-bash: cannot create temp file for here-document: No space left on device

root@alexus:~# cat /etc/issue.net
Ubuntu 14.04.3 LTS
root@alexus:~# uname -a
Linux alexus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@alexus:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        30G   17G   11G  61% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            487M  4.0K  487M   1% /dev
tmpfs           100M  404K  100M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            498M  352K  497M   1% /run/shm
none            100M     0  100M   0% /run/user
root@alexus:~# df -i
Filesystem      Inodes   IUsed  IFree IUse% Mounted on
/dev/vda1      1966080 1966080      0  100% /
none            127234      11 127223    1% /sys/fs/cgroup
udev            124520     402 124118    1% /dev
tmpfs           127234     346 126888    1% /run
none            127234       1 127233    1% /run/lock
none            127234      19 127215    1% /run/shm
none            127234       2 127232    1% /run/user
root@alexus:~# 

how do I free inodes?


Solution 1:

how do I free inodes?

Delete files.

Solution 2:

To free inodes, delete files. You use one inode per file. You probably have one or more directories full of very small files (like a Maildir, maybe).

If you do have massive Maildir archives, delete a file or two somewhere and convert them to mailboxes, at least partially.

If the purpose of your computer is to store millions of sub-8kB files, you need to reformat your filesystem with more inodes or add another filesystem with more inodes (try sudo pvs, if you still have some PFree it could be relatively easy).