purge-old-kernels deprecated

Bo Berglund bo.berglund at gmail.com
Sun Jan 8 15:26:53 UTC 2023


On Sat, 7 Jan 2023 19:26:07 +0000, Ian Bruntlett <ian.bruntlett at gmail.com>
wrote:

>Hi,
>
>I found the list of apt commands on this email thread quite interesting.
>
>So I came up with a shell script that I hope follows the advice given on
>this thread.
>
>Also, one thing I find necessary in normal use is to use the snap-store
>--quit command so that the snap snap-store can be updated. Question: how do
>I re-enable the snap-store once the updates have been completed?
>
>*NOTE* largely untested code lies ahead...
>
>#!/usr/bin/env bash
>set -e # exit immediately if a command returns a non-zero status
>set -x # print a trace of simple commands
>
>apt update # download package information
>apt full-upgrade -y # upgrade and remove packages if required
>apt autoremove -y
>apt autoclean # removes virtually useless files from the cache
>apt purge # even more tidying up

Could you explain what apt purge does?
When I google I only get answers like:
apt purge packagename
or
apt-get purge packagename

What happens when there is no extra argument like in this example?

># is it ok to do this here? snap-store --quit
>snap refresh         # refresh snaps in the system

What is snap in this context? Do I have this on my Ubuntu *server* 20.04.5 LTS
(All GUI discussions are moot since there is only a CLI interface)


-- 
Bo Berglund
Developer in Sweden




More information about the ubuntu-users mailing list