dizzo
Posts: 8
Joined: Mon May 14, 2018 12:31 am

Removing Installed Packages in Bulk

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?

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: Removing Installed Packages in Bulk

Wed Nov 28, 2018 3:27 pm

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).
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

klricks
Posts: 7231
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Removing Installed Packages in Bulk

Mon Dec 03, 2018 2:11 pm

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.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

fbe
Posts: 646
Joined: Thu Aug 17, 2017 9:08 pm

Re: Removing Installed Packages in Bulk

Mon Dec 03, 2018 9:07 pm

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.

User avatar
HawaiianPi
Posts: 5967
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Removing Installed Packages in Bulk

Mon Dec 03, 2018 11:19 pm

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
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Beginners”