Ubuntu 管理心得

搜尋此網誌

2024年8月16日 星期五

apt check auto or manul installed packages pkg

Because 'apt autoremove' will remove the pkgs installed from 'apt install', some old pkgs, eg. some old kernels are for vmware modules updated. can be not removed.

Vmware modules cannot be compiled in the new kernel 6.8.0-40.

  cf: https://help.ubuntu.com/community/RemoveOldKernels#GUI_Way 

The packages to remove are determined based in part on whether the package is marked as manually or automatically installed. You can check if a kernel providing package is marked as automatically installed using this command in a terminal:

apt-mark showauto 'linux-image-.*'

or to see if it is marked as manually installed:

apt-mark showmanual 'linux-image-.*'

In the event some kernel providing packages are marked as manual (possibly because they were installed via 'apt-get') and you want them autoremoved, you can change the status of the package using apt-mark auto and the package name. For example, to mark kernel 4.12.0-12-generic as autoremovable:

sudo apt-mark auto '^linux-.*-4\.12\.0-12(-generic)?$'
On the contrary, I want some kernels not to be autoremoved. So do this,
sudo apt-mark manual linux-headers-6.5.0-45-generic
sudo apt-mark manual linux-hwe-6.5-headers-6.5.0-45
sudo apt-mark manual linux-image-6.5.0-45-generic 
sudo apt-mark manual linux-modules-6.5.0-45-generic
sudo apt-mark manual linux-modules-extra-6.5.0-45-generic
sudo apt-mark manual linux-signatures-nvidia-6.5.0-45-generic
 
sudo apt-mark manual linux-headers-5.15.0-118
sudo apt-mark manual linux-headers-5.15.0-118-generic
sudo apt-mark manual linux-image-5.15.0-118-generic
sudo apt-mark manual linux-modules-5.15.0-118-generic
sudo apt-mark manual linux-modules-extra-5.15.0-118-generic
 


2024年8月13日 星期二

old firefox profile to new firefox

Because, firefox not allow using profile of old version, we can solve it as follows. 
  1. cp old profile to firefox user directory, say, /home/chiao/snap/firefox/common/.mozilla/
  2. In terminal, run:
    MOZ_ALLOW_DOWNGRADE=1 firefox -P
  3. close firefox and open firefox (no need in terminal)
  4. Done

2024年8月12日 星期一

Stuck at "press Ctrl-c to cancel the checks in progress on the filesystem"

Check /etc/fstab. Some line might cause this problem. For example, if some partition is deleted, but it is still in fstab, then ubuntu is keeping checking such non-exist partition. 


網誌存檔