purge-old-kernels deprecated

Ian Bruntlett ian.bruntlett at gmail.com
Sun Jan 8 15:52:53 UTC 2023


Hi Bo,

On Sun, 8 Jan 2023 at 15:28, Bo Berglund <bo.berglund at gmail.com> wrote:

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

I can give you the explanation from the man page. Simply do this:
$ man apt
And move down to the heading:
 install, reinstall, remove, purge (apt-get(8))
           Performs the requested action on one or more packages specified
via
           regex(7), glob(7) or exact match. The requested action can be
           overridden for specific packages by appending a plus (+) to the
           package name to install this package or a minus (-) to remove it.

           A specific version of a package can be selected for installation
by
           following the package name with an equals (=) and the version of
the
           package to select. Alternatively the version from a specific
release
           can be selected by following the package name with a forward
slash (/)
           and codename (bullseye, bookworm, sid ...) or suite name (stable,
           testing, unstable). This will also select versions from this
release
           for dependencies of this package if needed to satisfy the
request.

           Removing a package removes all packaged data, but leaves usually
small
           (modified) user configuration files behind, in case the remove
was an
           accident. Just issuing an installation request for the
accidentally
           removed package will restore its function as before in that
case. On
           the other hand you can get rid of these leftovers by calling
purge
           even on already removed packages. Note that this does not affect
any
           data or configuration stored in your home directory.

HTH :)


> What happens when there is no extra argument like in this example?
>
I think that it handles *all* relevant packages.

># 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)
>
According to the man page, "snap" is the command line "Tool to interact
with snaps" so I suspect you'll have it on your server.

The command "which snap" on my system yields:
/usr/bin/snap

The command
$ snap list
Lists all installed snaps - with these columns: Name, Version, Rev,
Tracking, Publisher and Notes

This command lists all snaps waiting for an update/refresh:-
$ snap refresh --list
On my system, it has told me: "All snaps up to date."

This command refreshes/updates all snaps:
$ snap refresh

There is a snap called "snap-store", published by canonical. My notes tell
me that in order to update that snap, I had to do:
$ snap-store --quit
$ snap refresh
However, that extra step (snap-store --quit) might no longer be needed.

Please note - I am not an authority on this topic - these are just my
observations...

HTH,


Ian

-- 
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://sites.google.com/site/ianbruntlett/home/free-software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20230108/3073ad5c/attachment.html>


More information about the ubuntu-users mailing list