Clean up Linux a little

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
8,181
Reaction score
6,656
Credits
54,581
Doing a bit of light reading to clear a little detritus from the innards....came across this....

Setup Synaptic correctly
Another setting which should be checked and, if needed, set correctly can be found in Synaptic. To check, and correct this setting, open Synaptic and go to:
Setting > Preferences.

This will open the Preferences menu. Now click on the tab Files and check if this option is enabled: Delete downloaded packages after installation. If this option is not enabled, click it to enable it. After that, click the on button Delete Cached package Files to clear the cache.

Now click on Status in the left sidebar of Synaptic and check if there are any packages listed. If there are any packages listed, mark them for removal and click on Apply. This will remove all applications which are already removed.

The first two paragraphs are known about and are in place.....however, the third paragraph "click on Status and check if any packages listed" etc....is not familiar to me

So...went to syanpatic ....clicked on Status......and lo & behold...the packages fill a page and then some !!

I get a trifle edgy when deleting/removing large quantities of stuff such as that.

(Yes, Timeshift is in place)

Safe ?
 


pnMypiV.png


selected 'Not Installed", and returned same list
 

Yes and no.

Where you say

If this option is not enabled, click it to enable it. After that, click the on button Delete Cached package Files to clear the cache.

When you go to click on that button, a smart tip comes up, ending in "now". Once you click, the operation is done, there is no need to click OK or Apply.

Where you are in the Screenshot in #2, revisit that and do some big scrolling, look for packages such as Openssh, SSH, and UFW &c.

If they appear in your list, then you do not want to select all and delete, you will brick your Distro.

Bring us back your findings, won't you?

Perfectly safe is an avenue through Terminal, for Debian-based Distros this is

Code:
sudo apt-get clean

This will clean out the entire contents of /var/cache/apt/archives which is hundreds of .deb files following an install. Remaining are a folder Partial, and a file with 0 (zero) bytes called lock I can explain elsewhere.

I've just used it on my Linux Mint 19 'Tara' Cinnamon to redeem 1.4 GB of space.

Cheers

Wizard
 
All good...clicked here and there and all over the place.

sudo apt-get clean did the trick as you said. Didnt get very much .1 of a gb

I still hold an interest in the syanptic "list"...extensive as it is.

Correct ...there are packages there such openssh, ssh etc etc

But that leaves an awful lot that aren't

Leave them ?....they all show as not installed
 
Correct ...there are packages there such openssh, ssh etc etc

But that leaves an awful lot that aren't

Leave them ?....they all show as not installed

My highlighting.

That aren't what? Blocked/checked/ticked?

That simply means they are not installed. And thus they are not consuming space on your System.

Your Tara Cinnamon according to your screenshot has 58,064 packages ... in its Repositories, these are held on the Net. Only 2,869 are installed.

So I wonder whether you are confusing installed packages and apps with available packages and apps. Or am I confused as to your thrust? (Wouldn't be the first nor the last time Wizard was confused, especially on my 2nd coffee for the day :eek::rolleyes::confused:)

So with those first 4 packages on RTS game Zero AD, they cannot be removed, as they are not there (on your system). You can use filters to remove them from plain view in a search, and there may be other options to neaten the appearance.

For The Viewers, any of those entries in SPM (Synaptic) that are not filled in/blocked, require your Internet connection to be on to install, and only then will they consume space.

Windows throws everything at you, and thus Win 10 on my new Dell consumes 60 GiB of space, compared to an average LInux of 7 - 10 GiB.

I can add more, just ask, but I wanted to check we were both on the same track :D

Wiz
BTW - just about any entry in SPM can reveal more information about itself if you click/highlight the line, and then information appears in the lower pane - expand or scroll as required.
 
Hey Condobloke and Wizard,

This is what I've always used for cleaning any of my Linux distros.
Although it does say Linux Mint (somewhat biased imo) :rolleyes:
it will work for most Linux distros.

How to clean Linux Mint 19 safely
https://sites.google.com/site/easylinuxtipsproject/4

Never had any problems doing it this way and you really don't have to clean very often.

Just thought I'd throw in my opinion.


poorguy ;)
 
You can always throw us an opinion Mate and we'll catch it. Brian and I used to play for the Aussie Cricket Team (NOT). :)

That bit where they show the use of the Update Manager View Kernels facility was something I was going to bring up for Brian and The Viewers, but you've saved me reinventing the wheel. Cheers.

The pundits say that you should keep 3 kernels on board, but I have been using 2 for possibly a year or more now, and suffered no adverse consequences to date.

In many Debian-based Distros, you can also use

Code:
sudo apt-get autoremove

... to similar effect.

With Brian using LM 18.3 'Sylvia', he may have a few old ones lying around?

Cheers

Wizard
BTW I have downloaded that script and am going to search for a suitable candidate on the old Toshiba. Do I take it you have used the script as well?
 
All good folks....my understanding has increased...exponentially.......and this thing is as clean as a whistle !
 
sorry late reply....been chasing a gecko (lizard) out the door ......and Belle just had to get in on the act.

Some of the gecko's here are around 6 - 8 inches long (20cm) and are quite fierce....nasty bite....so handle with care.

Came back to your reply Chris...re kernels......I currently have 3 installed....4.15.0-36 active
 
Gecko or skink?

You could claw back a couple of hundred MBs if you got rid of the oldest, but maybe neither here nor there.

Cheers

Wiz
 
I only stay with the latest 2 kernels.

I only clean every now and again.

Linux doesn't seem to get loaded up with crap other than thumbnails from browsing history.


Yikes on the lizards, I don't like any of them. :eek::p
 
they are actually a skink....but the locals call them all gecko's....so I go with the flow. Otherwise i hear mutterings about 'that bloody foreigner again'

kernels are fine.....I leave an older one in place jic (just in case)

Thanks guys/mates
 

Members online


Latest posts

Top