LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2020, 05:55 AM   #1
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Rep: Reputation: Disabled
How to remove dependencies installed from .deb files?


I am unable to remove dependencies installed from .deb files. For example, I downloaded the .deb files for vlc and its dependencies with the command 'sudo apt --download-only install vlc'. I can install vlc and its dependencies with 'sudo dpkg -i *.deb', and i can remove vlc with 'sudo dpkg -r vlc', but this doesn't remove its dependencies. And 'sudo apt autoremove' doesn't remove them also.
 
Old 07-31-2020, 06:38 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,617

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
If you can verify that they are no longer needed (see deborphan) you can remove them by name.
Why install from the deb file rather than directly using apt?
Why do you WANT to remove them?

Last edited by wpeckham; 07-31-2020 at 06:44 AM.
 
Old 07-31-2020, 07:14 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by peter7089 View Post
And 'sudo apt autoremove' doesn't remove them also.
It should, unless they are still needed by some other application.
Yes, this can happen with optional dependencies, called "Install Recommends" in Debian-speak.
It is possible to tell apt to not install recommends at all.

What dependencies did vlc pull in?

BTW, don't use dpkg unless absolutely necessary.
Why couldn't you just 'apt install vlc'?
 
Old 07-31-2020, 07:38 AM   #4
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
If you can verify that they are no longer needed (see deborphan) you can remove them by name.
Why install from the deb file rather than directly using apt?
Why do you WANT to remove them?
deborphan doesn't list them and removing them by name is not convinient when they are many. These are the deb files:
Code:
vlc-plugin-notify_3.0.11-0+deb10u1_amd64.deb
libixml10_1%3a1.8.4-2_amd64.deb
libxcb-xv0_1.13.1-2_amd64.deb
libupnp13_1%3a1.8.4-2_amd64.deb
vlc-l10n_3.0.11-0+deb10u1_all.deb
libgroupsock8_2018.11.26-1.1_amd64.deb
vlc-data_3.0.11-0+deb10u1_all.deb
libvlc5_3.0.11-0+deb10u1_amd64.deb
vlc-plugin-video-splitter_3.0.11-0+deb10u1_amd64.deb
vlc-plugin-visualization_3.0.11-0+deb10u1_amd64.deb
libsidplay2_2.1.1-15_amd64.deb
libaribb24-0_1.0.3-2_amd64.deb
libresid-builder0c2a_2.1.1-15_amd64.deb
libdvbpsi10_1.3.2-1_amd64.deb
libproxy-tools_0.4.15-5_amd64.deb
vlc-plugin-qt_3.0.11-0+deb10u1_amd64.deb
vlc_3.0.11-0+deb10u1_amd64.deb
libmatroska6v5_1.4.9-1+deb10u1_amd64.deb
liblirc-client0_0.10.1-5.2_amd64.deb
vlc-plugin-skins2_3.0.11-0+deb10u1_amd64.deb
libebml4v5_1.3.6-2_amd64.deb
libbasicusageenvironment1_2018.11.26-1.1_amd64.deb
libprotobuf-lite17_3.6.1.3-2_amd64.deb
vlc-bin_3.0.11-0+deb10u1_amd64.deb
libsdl-image1.2_1.2.12-10+deb10u1_amd64.deb
libvlc-bin_3.0.11-0+deb10u1_amd64.deb
libva-wayland2_2.4.0-1_amd64.deb
liblivemedia64_2018.11.26-1.1_amd64.deb
vlc-plugin-video-output_3.0.11-0+deb10u1_amd64.deb
vlc-plugin-base_3.0.11-0+deb10u1_amd64.deb
libspatialaudio0_0.3.0+git20180730+dfsg1-2_amd64.deb
vlc-plugin-samba_3.0.11-0+deb10u1_amd64.deb
libopenmpt-modplug1_0.4.3-1+deb10u1_amd64.deb
libusageenvironment3_2018.11.26-1.1_amd64.deb
libplacebo7_1.7.0-2_amd64.deb
libvlccore9_3.0.11-0+deb10u1_amd64.deb
I want to be able to install and remove packages offline.

I don't want to have residual packages on my system.
 
Old 07-31-2020, 07:40 AM   #5
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
It should, unless they are still needed by some other application.
Yes, this can happen with optional dependencies, called "Install Recommends" in Debian-speak.
It is possible to tell apt to not install recommends at all.

What dependencies did vlc pull in?

BTW, don't use dpkg unless absolutely necessary.
Why couldn't you just 'apt install vlc'?
I think when you install deb files locally they are marked as manually installed and 'apt autoremove' won't remove them.
 
Old 07-31-2020, 07:57 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
How did you install these dependencies?
If manually, then apt doesn't see them as dependencies at all because you installed them yourself.
You have to then equally manually uninstall them.

It's possible to install offline with apt, too.
Recommended, less chance to break your system.

Last edited by ondoho; 08-01-2020 at 03:30 AM.
 
Old 07-31-2020, 08:07 AM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by peter7089 View Post
deborphan doesn't list them and removing them by name is not convinient when they are many. These are the deb files:
Code:
vlc-plugin-notify_3.0.11-0+deb10u1_amd64.deb
libixml10_1%3a1.8.4-2_amd64.deb
libxcb-xv0_1.13.1-2_amd64.deb
libupnp13_1%3a1.8.4-2_amd64.deb
vlc-l10n_3.0.11-0+deb10u1_all.deb
libgroupsock8_2018.11.26-1.1_amd64.deb
vlc-data_3.0.11-0+deb10u1_all.deb
libvlc5_3.0.11-0+deb10u1_amd64.deb
vlc-plugin-video-splitter_3.0.11-0+deb10u1_amd64.deb
vlc-plugin-visualization_3.0.11-0+deb10u1_amd64.deb
libsidplay2_2.1.1-15_amd64.deb
libaribb24-0_1.0.3-2_amd64.deb
libresid-builder0c2a_2.1.1-15_amd64.deb
libdvbpsi10_1.3.2-1_amd64.deb
libproxy-tools_0.4.15-5_amd64.deb
vlc-plugin-qt_3.0.11-0+deb10u1_amd64.deb
vlc_3.0.11-0+deb10u1_amd64.deb
libmatroska6v5_1.4.9-1+deb10u1_amd64.deb
liblirc-client0_0.10.1-5.2_amd64.deb
vlc-plugin-skins2_3.0.11-0+deb10u1_amd64.deb
libebml4v5_1.3.6-2_amd64.deb
libbasicusageenvironment1_2018.11.26-1.1_amd64.deb
libprotobuf-lite17_3.6.1.3-2_amd64.deb
vlc-bin_3.0.11-0+deb10u1_amd64.deb
libsdl-image1.2_1.2.12-10+deb10u1_amd64.deb
libvlc-bin_3.0.11-0+deb10u1_amd64.deb
libva-wayland2_2.4.0-1_amd64.deb
liblivemedia64_2018.11.26-1.1_amd64.deb
vlc-plugin-video-output_3.0.11-0+deb10u1_amd64.deb
vlc-plugin-base_3.0.11-0+deb10u1_amd64.deb
libspatialaudio0_0.3.0+git20180730+dfsg1-2_amd64.deb
vlc-plugin-samba_3.0.11-0+deb10u1_amd64.deb
libopenmpt-modplug1_0.4.3-1+deb10u1_amd64.deb
libusageenvironment3_2018.11.26-1.1_amd64.deb
libplacebo7_1.7.0-2_amd64.deb
libvlccore9_3.0.11-0+deb10u1_amd64.deb
I want to be able to install and remove packages offline.

I don't want to have residual packages on my system.
It was a tough one to do but copy and paste this line into your terminal and type in the password once you have changed into the directory containing the packages. Most likely in /var/cache/apt/archives/ now they were installed.

Code:
 sudo dpkg --remove vlc-plugin-notify_3.0.11-0+deb10u1_amd64.deb libixml10_1%3a1.8.4-2_amd64.deb libxcb-xv0_1.13.1-2_amd64.deb libupnp13_1%3a1.8.4-2_amd64.deb vlc-l10n_3.0.11-0+deb10u1_all.deb libgroupsock8_2018.11.26-1.1_amd64.deb vlc-data_3.0.11-0+deb10u1_all.deb libvlc5_3.0.11-0+deb10u1_amd64.deb vlc-plugin-video-splitter_3.0.11-0+deb10u1_amd64.deb vlc-plugin-visualization_3.0.11-0+deb10u1_amd64.deb libsidplay2_2.1.1-15_amd64.deb libaribb24-0_1.0.3-2_amd64.deb libresid builder0c2a_2.1.1-15_amd64.deb libdvbpsi10_1.3.2-1_amd64.deb libproxy-tools_0.4.15-5_amd64.deb vlc-plugin-qt_3.0.11-0+deb10u1_amd64.deb vlc_3.0.11-0+deb10u1_amd64.deb libmatroska6v5_1.4.9-1+deb10u1_amd64.deb liblirc-client0_0.10.1-5.2_amd64.deb vlc-plugin-skins2_3.0.11-0+deb10u1_amd64.deb
libebml4v5_1.3.6-2_amd64.deb libbasicusageenvironment1_2018.11.26-1.1_amd64.deb libprotobuf-lite17_3.6.1.3-2_amd64.deb vlc-bin_3.0.11-0+deb10u1_amd64.deb libsdl-image1.2_1.2.12-10+deb10u1_amd64.deb libvlc-bin_3.0.11-0+deb10u1_amd64.deb libva-wayland2_2.4.0-1_amd64.deb liblivemedia64_2018.11.26-1.1_amd64.deb vlc-plugin-video-output_3.0.11-0+deb10u1_amd64.deb vlc-plugin-base_3.0.11-0+deb10u1_amd64.deb libspatialaudio0_0.3.0+git20180730+dfsg1-2_amd64.deb vlc-plugin-samba_3.0.11-0+deb10u1_amd64.deb libopenmpt-modplug1_0.4.3-1+deb10u1_amd64.deb libusageenvironment3_2018.11.26-1.1_amd64.deb libplacebo7_1.7.0-2_amd64.deb libvlccore9_3.0.11-0+deb10u1_amd64.deb
Edit: and now I think since you want no unnecessary items on your system a sudo apt clean will eliminate the packages in the already mentioned cache directory freeing up that space too...

Last edited by HappyTux; 07-31-2020 at 08:18 AM.
 
Old 07-31-2020, 08:33 AM   #8
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by peter7089 View Post
deborphan doesn't list them
If deborphan doesn't list those lib* packages then they're still needed, perhaps not by vlc, but by some other installed package(s). You may try harder though by specifying the -n option to deborphan.

Last edited by shruggy; 07-31-2020 at 08:39 AM.
 
Old 07-31-2020, 09:27 AM   #9
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
How did you install these dependencies?
If manually, then apt doesn't see them as dependencies at all because you installed them yourself.
You have to then equally manually uninstall them.

Let me guess, you deleted the original .deb's and don't know anymore?
It's in a log file, somewhere under /var/log. Not sure dpkg logs to apt's log, maybe it has its own.

It's possible to install offline with apt, too.
Recommended, less chance to break your system.
No, i didn't delete the deb files. I run 'sudo apt clean' before running 'sudo apt --download-only install vlc', than i moved the packages to a folder.

But i think i found how to install dependency automatically when i am offline. I tested that with other application - geany, because i can't do that with vlc anymore. If i run 'sudo apt install geany' it installs only two packages - geany and geany-common. So, i downloaded the packages with 'sudo apt --download-only geany', then disconnected from internet and run 'sudo apt install geany' and this installed the application. After that i removed geany with 'sudo apt remove geany' and when i run 'sudo apt autoremove' it removed geany-common also.

So, i guess if i am offline and want to install deb packages i better copy them to /var/cache/apt/archive and run 'sudo apt install packname'. This way the dependencies will be installed automatically and after that can be removed with 'apt autoremove'.
 
Old 07-31-2020, 09:31 AM   #10
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by HappyTux View Post
It was a tough one to do but copy and paste this line into your terminal and type in the password once you have changed into the directory containing the packages. Most likely in /var/cache/apt/archives/ now they were installed.

Code:
 sudo dpkg --remove vlc-plugin-notify_3.0.11-0+deb10u1_amd64.deb libixml10_1%3a1.8.4-2_amd64.deb libxcb-xv0_1.13.1-2_amd64.deb libupnp13_1%3a1.8.4-2_amd64.deb vlc-l10n_3.0.11-0+deb10u1_all.deb libgroupsock8_2018.11.26-1.1_amd64.deb vlc-data_3.0.11-0+deb10u1_all.deb libvlc5_3.0.11-0+deb10u1_amd64.deb vlc-plugin-video-splitter_3.0.11-0+deb10u1_amd64.deb vlc-plugin-visualization_3.0.11-0+deb10u1_amd64.deb libsidplay2_2.1.1-15_amd64.deb libaribb24-0_1.0.3-2_amd64.deb libresid builder0c2a_2.1.1-15_amd64.deb libdvbpsi10_1.3.2-1_amd64.deb libproxy-tools_0.4.15-5_amd64.deb vlc-plugin-qt_3.0.11-0+deb10u1_amd64.deb vlc_3.0.11-0+deb10u1_amd64.deb libmatroska6v5_1.4.9-1+deb10u1_amd64.deb liblirc-client0_0.10.1-5.2_amd64.deb vlc-plugin-skins2_3.0.11-0+deb10u1_amd64.deb
libebml4v5_1.3.6-2_amd64.deb libbasicusageenvironment1_2018.11.26-1.1_amd64.deb libprotobuf-lite17_3.6.1.3-2_amd64.deb vlc-bin_3.0.11-0+deb10u1_amd64.deb libsdl-image1.2_1.2.12-10+deb10u1_amd64.deb libvlc-bin_3.0.11-0+deb10u1_amd64.deb libva-wayland2_2.4.0-1_amd64.deb liblivemedia64_2018.11.26-1.1_amd64.deb vlc-plugin-video-output_3.0.11-0+deb10u1_amd64.deb vlc-plugin-base_3.0.11-0+deb10u1_amd64.deb libspatialaudio0_0.3.0+git20180730+dfsg1-2_amd64.deb vlc-plugin-samba_3.0.11-0+deb10u1_amd64.deb libopenmpt-modplug1_0.4.3-1+deb10u1_amd64.deb libusageenvironment3_2018.11.26-1.1_amd64.deb libplacebo7_1.7.0-2_amd64.deb libvlccore9_3.0.11-0+deb10u1_amd64.deb
Edit: and now I think since you want no unnecessary items on your system a sudo apt clean will eliminate the packages in the already mentioned cache directory freeing up that space too...

This doesn't work, i already tried it. It's probably because the packages are installed with different names.
 
Old 07-31-2020, 09:33 AM   #11
peter7089
Member
 
Registered: May 2016
Distribution: MX Linux
Posts: 249

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
If deborphan doesn't list those lib* packages then they're still needed, perhaps not by vlc, but by some other installed package(s). You may try harder though by specifying the -n option to deborphan.
If i run 'deborphan -n' it list these packages:
Code:
fcitx-frontend-qt5
fcitx5-module-quickphrase-editor
fonts-noto-hinted
fonts-roboto-hinted
gir1.2-ayatanaappindicator3-0.1
gir1.2-gtksource-3.0
gir1.2-secret-1
gir1.2-webkit2-4.0
gnome-keyring-pkcs11
gstreamer1.0-gl
hunspell-gl-es
hunspell-sv-se
kodi-visualization-spectrum
libaacs0
libbdplus0
libblockdev-crypto2
libcanberra-gtk3-module
libcec4
libclutter-1.0-common
libcogl-common
libcupsfilters1
libenchant-voikko
libgail-common
libgdk-pixbuf2.0-bin
libmtp-runtime
libqt5sql5-sqlite
libsasl2-modules
libu2f-udev
libwacom-bin
qt5-gtk-platformtheme
qtwayland5
tix
 
Old 07-31-2020, 12:45 PM   #12
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Those packages are not dependencies of anything else. You should know better than us if you need them. If you don't know what they are then you probably can remove them.

Last edited by shruggy; 07-31-2020 at 12:47 PM.
 
Old 08-01-2020, 03:32 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by peter7089 View Post
But i think i found how to install dependency automatically when i am offline. I tested that with other application - geany, because i can't do that with vlc anymore. If i run 'sudo apt install geany' it installs only two packages - geany and geany-common. So, i downloaded the packages with 'sudo apt --download-only geany', then disconnected from internet and run 'sudo apt install geany' and this installed the application. After that i removed geany with 'sudo apt remove geany' and when i run 'sudo apt autoremove' it removed geany-common also.
That's what I meant.
It has the advantage that you allow apt to take full care of your package management which is highly recommended on a Debian system.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu deb installation package dependencies and installed software verify issues ZH_Y Linux - Software 1 03-13-2020 07:43 PM
Issues with dependencies when installing php70-fpm. I have newer versions of the dependencies installed, but php70-fpm requires older KurtisKewl *BSD 9 05-02-2017 01:23 PM
How do you check for a list of .deb dependencies without installing the deb file arthur_makowah Linux - Newbie 3 07-23-2014 11:04 PM
grub-mkconfig sees both installed oses (deb & mint), but lists both as deb part. slacker_ Linux - General 14 06-22-2014 05:07 AM
unpack multiple deb files with dpkg-deb? steve51184 Linux - Software 2 02-13-2011 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration