0

In my ubuntu 22.04, I mainly use snap pacakages but whenever an snap is update it's old pacakage still remains, how can I remove that

two pacakages of same apps like telegram etc

2
  • That's not a bug; it's a feature. The older version is supposed to remain in case the newer fails for some reason.
    – user535733
    Jun 28, 2022 at 13:09
  • So whenever an new update older version, will still be there or will the older versions be automatically removed.
    – ABHILASH T
    Jun 28, 2022 at 13:23

1 Answer 1

1

Snap retains a minimum of two old application versions, the documentation doesn't say why but we should assume it's to easily roll back if you encounter an issue.

https://snapcraft.io/docs/keeping-snaps-up-to-date#heading--refresh-retain

You can use sudo snap set system refresh.retain=2 to set it to the minimum value and snap will automatically remove the older versions. However, since 2018 this is already the default for Ubuntu so it likely won't make any difference.

If that doesn't help and you're low on space, this answer lists a script for removing old versions that you could try.

1
  • 1
    retain=2 became the default setting in 2018. The command is useful only for systems that pre-date the change.
    – user535733
    Jun 28, 2022 at 13:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .