Created
August 4, 2015 11:54
-
-
Save 0xf10e/80cb5b8c10fefed88dfd to your computer and use it in GitHub Desktop.
Remove all the desktop stuff from Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# may need additional "xubuntu-*" or the likes for other flavors | |
apt-get remove $(for PKG in $(dpkg-query \ | |
--showformat='${Essential} ${Status}:${Package} ${Depends} ${Recommends}\n\n' \ | |
--show \*-desktop lubuntu\*| sed -e '/^yes/d' -e '/not-installed/d' -e 's/^[^:]*://' \ | |
-e 's/(\(<<\|>=\).*)//g' -e 's/|//g' -e 's/:any //g' -e s/,//g); | |
do | |
dpkg-query --showformat='${Status}: ${Package}\n' --show $PKG | sed -ne 's/^install ok installed://p'; | |
done) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment