Page 1 of 1

Removing Installed Packages in Bulk

Posted: Wed Nov 28, 2018 2:07 pm
by dizzo
I have a 3B+ that is currently running headless and being used as a Plex Server. What I'd like to do is essentially remove the vast majority of pre-installed packages. Leaving basically only Plex, Teamviewer and VNC for remote access.

I can't find a way to list only my installed packages so that I can bulk remove them. There doesn't appear to be an option to show only currently installed packages in the add/remove software area.

Is there anyway to show only the installed packages to that I can remove most of them?

Re: Removing Installed Packages in Bulk

Posted: Wed Nov 28, 2018 3:27 pm
by n67
1) There is no need to do this. All you'd be doing is saving disk space, and disk space is cheap/irrelevant. These programs don't consume any resources if they are not used (yes, there may be exceptions to this rule).

2) You'll probably mess something up - remove something you shouldn't have removed - and then post about that to the forum.

3) Take a look at the output of "dpkg -l". If the first column is "ii", then that package is installed. I'm not sure what other codes are possible for the first field. On the one system where I checked, the only other code was "rc" - which shows up in about 25 lines (out of about 1500).

Re: Removing Installed Packages in Bulk

Posted: Mon Dec 03, 2018 2:11 pm
by klricks
dizzo wrote:
Wed Nov 28, 2018 2:07 pm
I have a 3B+ that is currently running headless and being used as a Plex Server. What I'd like to do is essentially remove the vast majority of pre-installed packages. Leaving basically only Plex, Teamviewer and VNC for remote access.

I can't find a way to list only my installed packages so that I can bulk remove them. There doesn't appear to be an option to show only currently installed packages in the add/remove software area.

Is there anyway to show only the installed packages to that I can remove most of them?
As mentioned removing packages is pointless unless you need the disk space for something else.
But to answer your question....
This text based Package Manager can show a list of installed packages:

Code: Select all

sudo aptitude
Or a much better GUI PM can be installed:

Code: Select all

sudo apt update
sudo apt install synaptic
Note: Do not randomly remove packages unless you know they are not needed.

Re: Removing Installed Packages in Bulk

Posted: Mon Dec 03, 2018 9:07 pm
by fbe
klricks wrote:
Mon Dec 03, 2018 2:11 pm
As mentioned removing packages is pointless unless you need the disk space for something else.
They cause useless network traffic when they get updated. Some updates even caused errors.

Re: Removing Installed Packages in Bulk

Posted: Mon Dec 03, 2018 11:19 pm
by HawaiianPi
The new 2018-11-13 Raspbian release now has Desktop and Full versions, the former having minimal fluff installed.

Raspbian Stretch with desktop (sort of a "Desktop Lite"): https://downloads.raspberrypi.org/raspbian_latest

Raspbian Stretch with desktop and recommended software: https://downloads.raspberrypi.org/raspbian_full_latest