Error download visual studio code

:: Synchronizing the package database…
code.db failed to download
error: failed to get file “code.db” from packages.microsoft.com : The requested URL returned error: 404
error: failed to sync all databases (failed to get some files)

how to remove code.db pkg from download list?

Hi @zeus1, and welcome!

I detect an XY problem here.

You don’t want to remove that file, not really. You want to fix thee error, and it seems the way is by removing that file, while it is, actually, essential.

That is the real problem. It couldn’t sync the databases, and to do that it needs a file that it was unable to retrieve. Which sounds like some kind of internet connectivity problem. Most likely a DNS problem, if we go with my guess.

Please open a terminal, and run the following commands and provide the output here afterwards:

ping manjaro.org

And

ping 1.1.1.1

and

ip a

Hope you manage!


:bangbang: Tip: :bangbang:

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:

```
pasted text
```

This will just cause it to be rendered like this:

Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.

Instead of like this:

Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby increasing legibility thus making it easier for those trying to provide assistance.

For more information, please see:


:bangbang::bangbang: Also, if your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.


In order for us, or anyone for that matter, to be able to provide assistance, a lot of information is necessary. To that end, please see:

This looks like a manually added repository. You should remove it.
Also this doesn’t seem related to AUR.

It might be, didn’t see that. In my opinion it’s better to use code-oss anyway, since it’s basically the same thing:

And, @zeus1, it’s in the community repository:

$ pamac search vscode
[...]
code-marketplace                                                                                                                                                                                        [Installed] 1.73.0-1                      AUR
Enable vscode marketplace in Code OSS
code                                                                                                                                                                                                    [Installed] 1.74.2-1                      community
The Open Source build of Visual Studio Code (vscode) editor
[...]

So you can install it with:

pamac install code

If you want to use the marketplace, you have to install it separately:

pamac build code-marketplace

yes, i tried to install manually. now I can’t update using the command sudo pacman -Syu.

how do i remove code.db?

I think you’d do well to study and remember this:

I told you what to do higher up. I said, you don’t.

What’s the error it gives you?

I managed to install code-oss, but the command sudo pacman -Syu gives this error:

:: Synchronizing package databases…
code.db failed to download
error: failed retrieving file ‘code.db’ from packages.microsoft. com : The requested URL returned error: 404
error: failed to synchronize all databases (failed to retrieve some files)

Please provide the output of:

cat /etc/pacman.conf

:bangbang: Tip: :bangbang:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead of like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby improving legibility and making it much easier for those trying to be of assistance.

[code]
SigLevel = Optional TrustAll
Server = https://packages.microsoft.com/yumrepos/vscode

Remove that complete section from the file.

Edit:

Also, please don’t update using,

…unless you know what you’re doing, in which case I doubt you’d have had this problem.

I recommend rather using pamac:

pamac upgrade && pamac upgrade --aur --devel || echo -e '\033[0;91mThere was an error upgrading the system. AUR packages not upgraded.\e[0m'

This will update your system and ONLY if that was successful update any AUR packages.

a Reminder: While use of the AUR is possible, it’s neither recommended nor supported.


I recommend pamac instead of pacman , especially for newcomers as pamac was developed by Manajaro (developers) for Manjaro and just takes care of more thing than pacman

now give this output:

error: no usable package repositories configured.

Please provide the complete output for:

cat /etc/pacman.conf

I didn’t know that, it’s pretty similar to apt from ubuntu.

pamac upgrade output:

Preparing...
Synchronizing package database...
Failed to synchronize the databases
Nothing to do.
Transaction successfully finished.

there is nothing else in /etc/pacman.conf.

Well, that would explain it. It shouldn’t be empty. It should have this content:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
# If upgrades are available for these packages they will be asked for first
SyncFirst    = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#NoProgressBar
# We cannot check disk space from within a chroot environment
#CheckSpace
#VerbosePkgLists
#ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

Replace the empty file contents with that, save it, and try again.

From:

1 Like

thank you, sorry for the inconvenience.

1 Like

No problems. But be more careful in the future. Also of the dreaded XY problem.

Alright, I’ll pay more attention!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.