sudo apt-get remove --auto-remove --purge 'libx11-.*'
A debatably useful thing to do, since the complete X11 install is probably only a few hundred MB.
Interesting to note the reference to "dependency problems, but doing as you requested anyway". I'd say there's then a bug in apt/dpkg that shows up, but this is debatable too based the extent to which:
1) A tool should allow you to shoot you in your own foot. Or drill a hole in your own hand, or whatever, if you misuse it.
2) Appropriate warnings were provided.
3) This is really a consequence of having done something the wrong way, or just coincidence.
It appears you are still in a GUI so I presume this is from an SSH or other remote terminal.
Yesterday i also had similar issues
You don't explain what you mean by "similar". If you mean more or less the same, then obviously the result here is predictable. If that's all it is, I would not worry too much for now, but also don't do the same thing over and over again expecting a different result.
If you want a GUI-less install, start with the jessie-lite image (presuming you are using Raspbian). My preference is to actually start with the jessie-lite image (about 1.5 GB) and then install the GUI the way I want it; including a WM and various applications this adds another 1/2 GB, which is why I am pretty sure "x11-*" doesn't add up to much, depending on what also gets removed. I'm guessing
--auto-remove --purge might do quite a bit and saved you somewhere around that, but before you take a wall down with a sledgehammer, make sure you understand what's in the wall. If you aren't sure, don't use a sledgehammer.